Custom info message in sequence 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
ecos
Premium Member
Premium Member
Posts: 3
Joined: Fri Oct 26, 2018 2:07 am
Location: Tortona
Contact:

Custom info message in sequence job

Post by ecos »

Hi, i'd like to generate custom info message inside a sequence Job based on certain event. Is it possible somehow?
ecos
Premium Member
Premium Member
Posts: 3
Joined: Fri Oct 26, 2018 2:07 am
Location: Tortona
Contact:

Re: Custom info message in sequence job

Post by ecos »

i achieved this by simply using Execute_Command stage.
Thanks anyway
Abed
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That was fast. :wink:

There may be other ways, would you like to discuss / explore them? If so, we'd need details about the nature of the 'custom info message' (log, email, does the text need to include variables, etc) and what kind of event we're talking about.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ecos
Premium Member
Premium Member
Posts: 3
Joined: Fri Oct 26, 2018 2:07 am
Location: Tortona
Contact:

Post by ecos »

Hi Craig, thanks for replying. unfortunately the reply notification service was switched off so i didn't receive an email with your reply. I am certainly interested to discuss other ways to do it. I have a Server Job with triggers configured in base of the return value of the job. When the value = x the sequence should stop executing and should show a parametrized log message to notify the user about the reasons.
As i wrote in the previous post, i've used an Execute Command Activity with the following echo command;
echo "THE REFERENCE DATE:#REFERENCE_DATE# IS MISSING IN THE SOURCE TABLE: #SOURCE_TABLE#"
Tell me if you need further details
Thanks again,
Abed
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I would use a Routine activity, to log an informational (or warning) message as appropriate. Some are provided (see \Routines\sdk\Utility\UtilityMessageToLog) or adapt it to return 0.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, that would be a primary and the most generic mechanism, something you could pass a string to and all it would do is write it to the job's log using (off the top of my head) the DSLogInfo() function. There are warning and error versions if needed. And as noted, if you are using automatic error detection in your sequences, make sure it returns a zero as any non-zero return value will be interpreted as a failure.. unless you handle it properly. How to do that is all spelled out in the Help for those Sequence job options, btw.

And if we're still talking about getting messages into the Sequence job's log, something that people can overlook is all of the stages have a property where you can put a message to be posted to the log when the stage runs. From what I recall, it can't be customized to bind in runtime data but can come in handy at times.
-craig

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