Page 1 of 1

Custom info message in sequence job

Posted: Thu Jul 04, 2019 6:46 am
by ecos
Hi, i'd like to generate custom info message inside a sequence Job based on certain event. Is it possible somehow?

Re: Custom info message in sequence job

Posted: Thu Jul 04, 2019 7:11 am
by ecos
i achieved this by simply using Execute_Command stage.
Thanks anyway
Abed

Posted: Thu Jul 04, 2019 9:13 am
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.

Posted: Thu Jul 11, 2019 4:59 am
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

Posted: Sat Jul 13, 2019 8:17 pm
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.

Posted: Tue Jul 16, 2019 8:27 am
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.