shell script to call job logs showing the current job

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: shell script to call job logs showing the current job

Post by chulett »

peep wrote:Can i use -run -wait parameters?
No. Either only run the script once the job has completed or make a -jobinfo loop inside the script until it tells you the job is complete then pull the log records.
-craig

"You can never have too many knives" -- Logan Nine Fingers
peep
Premium Member
Premium Member
Posts: 162
Joined: Mon Aug 20, 2012 6:52 pm

Post by peep »

-jobloop
How can I create ?
I hav no idea ...can u pls help
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I said a -jobinfo loop. Meaning, in an iterative fashion make a normal dsjob -jobinfo function call until the results say that the job has finished. So a "while" or "do" loop much like you've already posted but just checking the status of the job. Once it has finished, do the call to get the -logdetail information.
-craig

"You can never have too many knives" -- Logan Nine Fingers
peep
Premium Member
Premium Member
Posts: 162
Joined: Mon Aug 20, 2012 6:52 pm

Post by peep »

K thanks
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

Our shell scripts run the job with -wait and then once the dsjob command finishes the shell script then interrogates the log with another dsjob command. Are your jobs being run from a shell script like this, or does your log interrogation have to be done outside of the process that actually runs the job? An all-in-one script that runs and then retrieves the log would be neater.
Phil Hibbs | Capgemini
Technical Consultant
Post Reply