DataStage and Logging

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage BASIC has the PRINT statement (synonyms CRT and DISPLAY) that output to stdout. It does not have the capability to address stdout directly.
To find out the names of the jobs controlled by a batch is possible but non-trivial. However, if you are reading the batch job's log, then there will be "job run request" messages. You can read the detailed version of these to determine which controlled job's run is being requested.
Now that you have the name of the controlled job (parked in a variable) you can interrogate ITs properties or its log to get its exit status. The latter is most readily accomplished via the DSGetNewestLogId function.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Probably should have mentioned in the previous posting that DataStage jobs run as background processes so that, in the ordinary course of events, stdout would not be visible (say, for example, were you to run the job interactively). Similarly, active stage types such as Transformer stages (and the routines that they call) run in separate processes. Caveat developer!
Post Reply