Job Sequence: Downgrade warning message to info?

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
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Job Sequence: Downgrade warning message to info?

Post by jackson.eyton »

Hi everyone,
I have an issue with sequence jobs where we have the notification activity branched off at various points to send a text to us in ETL so we are aware of the nightly running process progression. We have several sequence jobs that run other sequence jobs. Some of these require that the previous sequence job have completed with no errors or warnings.

This is where we run into a problem. Remember those text notifications I mentioned? Well, if IT makes a change to the Exchange server which then prevents the outbound relay from sending messages to that particular destination domain, the sequence will log a warning for the notification stage.

I don't really want the sequence job to prevent processing after staging threw a warning due to a notification stage failure. :-( On the same token, I don't want daily processing to run if one of the staging jobs in the staging sequence happens to throw a warning. I don't suppose there is a way to drop the message status for certain message ID's globally?
-Me
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's only an option for Parallel jobs, as far as I know.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Post by jackson.eyton »

That is my understanding as well, but figured I would ask. I don't suppose I could set a link condition to the specific components of a sequence job? So, say I have SequenceA and SequenceB. SequenceA has parts 1, 2, and 3. I then have Sequence_Alphabet that runs SequenceA and SequenceB (lets not worry about what SequenceB does). Is it possible to connect SequenceA to SequenceB and make the link trigger condition only run SequenceB IF parts 2 and 3 of SequenceA completed? So assume 1, 2, and 3 are other Job Activity stages, would I be able to make an expression something like this?
(SequenceA.2.$JobStatus = 1 Or SequenceA.2.$JobStatus = 2 Or SequenceA.2.$JobStatus = 11) And (SequenceA.3.$JobStatus = 1 Or SequenceA.3.$JobStatus = 2 Or SequenceA.3.$JobStatus = 11)
-Me
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Okay... it's been a hellova day and I don't have the brainpower left to fully digest your situation but wanted to make a comment on your ending expression. Yes, you certainly can but I would advise that you don't hard-code the number values like that. Use the "DSJS" values instead like "DSJS.RUNOK" rather than 1. I don't have all of them handy but they have been documented here in the past and are in one of the include files out on the server as well. From what I recall, anywho.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Post by jackson.eyton »

No problem at all, I appreciate the discussion! Any particular reason to use DSJS over the actual job codes? I only ask as we switched most of our links to use the actual job status code instead of RUNOK or RUNWARN. We did this due to datastage not correctly triggering on a RUNOK at times. When we switched to the job code we've not had issues any longer. This however is an aside to my actual question. I am, wishfully, hoping that it is possible to check the substatus of a job within a sequence job to say in a link condition that if the status of a job within the sequence completed OK then go ahead and run, even if the parent sequence itself had a WARN status. I've bolded the SUB components in the quote below. I assume that the answer is a big NO it cant work that way.
I don't suppose I could set a link condition to the specific components of a sequence job? So, say I have SequenceA and SequenceB. SequenceA has parts 1, 2, and 3. I then have Sequence_Alphabet that runs SequenceA and SequenceB (lets not worry about what SequenceB does). Is it possible to connect SequenceA to SequenceB and make the link trigger condition only run SequenceB IF parts 2 and 3 of SequenceA completed? So assume 1, 2, and 3 are other Job Activity stages, would I be able to make an expression something like this?
(SequenceA.2.$JobStatus = 1 Or SequenceA.2.$JobStatus = 2 Or SequenceA.2.$JobStatus = 11) And (SequenceA.3.$JobStatus = 1 Or SequenceA.3.$JobStatus = 2 Or SequenceA.3.$JobStatus = 11)
-Me
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Interesting. I don't recall ever seeing an issue like that but then it's been 8+ years since I've actually touched DataStage. And from I recall, the DSJS usage was presented as a Best Practice, mostly to "future proof" things?

Maybe Ray will wander by and add his wisdom to this topic. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSJS usage was presented as a Best Practice, mostly to "future proof" things.

Nothing else to add. If you look at its definition, DSJS.RUNOK cannot be anything else but 1 (on versions to date) so I don't understand the problem that you earlier mentioned. If a job doesn't have a status of DSJS.RUNOK, then it has one of the other 13 possible status values.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Post by jackson.eyton »

Which that may have been our issue all along for that. Many of our jobs are OK to continue if they finish with warning, and I believe the biggest thing was running through sequence logic with the jobs it calls set to validate only, as a test measure. If I recall correctly, which its possible that I am not, we had cases where the job would validate fine, but the sequence would not continue to the next job as the link was looking for a RUNOK. We changed that to say JobStatus = 1 or 2 or 11. I will keep this in consideration as it sounds like the hard status codes are potentially subject to change in the future, where DSJS.RUNOK will always be the equivalent of a successful job complete status code.

Back to the topic of this thread however, I assume then that there is absolutely no way to bypass a specific warning message either through the job logging itself, or the link trigger conditions?
-Me
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Post by jackson.eyton »

Ok, I did some more research and ended up just creating a sequence that calls the DSSendMessage routine straight up. I have a couple of UserVariables Activity stages that are used to build the message and recipients. This seems to work fine and won't return a complete job warning if the mail relay rejects the message, tested by using a fake mail relay server address. This should prevent the sequence jobs that need to check for warnings on ACTUAL jobs from warning on messaging failures/warnings as they are not logged as warnings.
-Me
Post Reply