Warnings & Rejects

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
levans
Participant
Posts: 3
Joined: Mon Aug 12, 2002 8:23 am
Location: USA

Warnings & Rejects

Post by levans »

I am putting my job series into a job sequencer and am having trouble getting the trigger to work like I want. For all of my jobs I am going to have 'Rejects'. I would like my job sequence to continue along my stream of jobs (1) if the warnings produced are only for rejects, or if the job runs successfully with no warnings. If there are any other types of warnings (2)I would like the job to go down another path. I have tried using a custom trigger:
(1)DSJ.LOGREJECT > 0, but this works if the only warnings are rejects. If the job produces other warnings and reject warnings then the DSJ.LOGREJECTS > 0 criteria will still be met and the next job will run (which I do not want). For this link I have also tried DSJ.LOGWARNING < 0 AND DSJ.LOGREJECT > 0, but that doesn't work because a reject is a warning.

If a job produces additional warnings plus reject warnings, how do I distinguish between the two, since a reject is in fact a warning...?
spracht
Participant
Posts: 105
Joined: Tue Apr 15, 2003 11:30 pm
Location: Germany

Post by spracht »

Hi Laura,

I never used sequencers and never heard of the mentioned ?Jobinfo? types. But to me it sounds like you could do what you want if your condition would be:

DSJ.LOGWARNING>0 And DSJ.LOGWARNING=DSJ.LOGREJECT

which means: there have been warnings and all warnings were rejects

Hope this helps!

Stephan
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
The way to achieve your goal is quite simple.
instead of using rejects you can simply use the oposite constraint to the other link going out of your transformer, thus eliminating the warning issue, instead of using the reject option.
if you got more situations which you want to be able to respond to in the sequence job you might want to use the user status in your job raised at a transformer and branch acordingly in your sequence job.
I always prefer treating warnings as a sign that something is "really" wrong and execution shouldn't continue.
I hope this helps & Good Luck,



Roy R.
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

quote:Originally posted by roy
I always prefer treating warnings as a sign that something is "really" wrong and execution shouldn't continue.


This would not be possible for PX jobs, where warnings are a dime a dozen. Here is something you could use for your Trigger:

jobname.$JobStatus = ##

Where:

0 = OK
1 = Warnings
2 = Fatal

(and a bunch of 9x values for each individual status).

That is a method you can use to determine if there is a warning thrown for the job.

-T.J.


* * *

... now if this can make breakfast, my life is complete.
Post Reply