How to get separate Status of a job on each run?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ushasunkara
Participant
Posts: 23
Joined: Wed Jan 18, 2006 10:43 am

How to get separate Status of a job on each run?

Post by ushasunkara »

Hi,

I'm using loop activities in a sequence. In that sequence i'm calling a job and mailing the status of that job before end loop activity. But for the second run on the loop i'm getting the combined status of first run and second run. How can i get separate status of the job on each run?

Thanks in advance,
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

How are you getting the status of your job?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ushasunkara
Participant
Posts: 23
Joined: Wed Jan 18, 2006 10:43 am

Post by ushasunkara »

I'm getting Status on first run as

'A'

and on the second run status is

'A'
*********
'B'

where 'B' is the status of the job on second run.

But on the second run i should get the status as only 'B'
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

By checking that option in the Notification Activity, I assume. :wink:

You'd have to write your own routine to use the various 'DSGetLog' functions to retrieve just the latest information from the log. That option in the stage does exactly what you've noted, it includes all information up to the current point in the process.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

No, i didnt mean how it looks like, i meant how are you getting it? Are you using the notification activity to include job report, do you have a custom routine to get the job status?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ushasunkara
Participant
Posts: 23
Joined: Wed Jan 18, 2006 10:43 am

Post by ushasunkara »

DSguru2B wrote:No, i didnt mean how it looks like, i meant how are you getting it? Are you using the notification activity to include job report, do you have a custom routine to get the job status? ...
I'm not using any custom routine. I'm using notification activity. Could you please which functions i can use to generate the latest status of the job?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

chulett wrote: You'd have to write your own routine to use the various 'DSGetLog' functions to retrieve just the latest information from the log.
Look at Craig's reply again. He mentioned DSGetLog() function. Read about it in DS help. You will also be able to find many examples here on dsxchange.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Specifically:

DSGetNewestLogId
DSGetLogEntry


The online help for the latter actually shows how to use the two together to get what you want.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply