Avatar of anirrao
anirrao

asked on 

db2 commands in a batch file

I have a query  select (current date - date(last_refresh_timestamp)) from tbname where some condition
I want the o/p of the query to be assigned to some variable in a batch script,check whether the result of the query>1 then issue net stop svcename ,I need to run it as a batch file.Any ideas on how to accomplish this.
Windows BatchDB2

Avatar of undefined
Last Comment
Kent Olsen
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

maybe you can do it using wmi extensions of db2
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Windows Batch
Windows Batch

Batch files are text files containing a script of commands that are executed by the command interpreter on DOS, OS/2 and Windows systems. Most commonly, they are used to perform a series of functions that are repeated -- copying a set of files created daily with one step, for example.

13K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo