Page 1 of 1

Posted: Sun Sep 29, 2002 6:20 pm
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.

Posted: Sun Sep 29, 2002 6:22 pm
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!