Page 1 of 1

Arguments to DataStage Macros

Posted: Fri Apr 07, 2006 3:53 pm
by ray.wurlod
jharvat wrote: I would also like to know how you can pass dynamic parameters to a macro in DataStage. Can someone else fill in the blanks?

DataStage macros are defined in JOBCONTROL.H, which is to be found in the DSINCLUDE directory.

If you inspect how they are defined, it will become clear that there is no capacity in the mechanism for passing dynamic arguments to them. Instead, you need to call the embedded function directly.

Example of DataStage macro definition:

Code: Select all

$IFNDEF DSJobName
$DEFINE DSJobName DSGetJobInfo(DSJ.ME,DSJ.JOBNAME)
$ENDIF

The $DEFINE declaration is a compile-time substitution. It does not have an argument-passing mechanism.

Posted: Fri Apr 07, 2006 6:25 pm
by kduke
Should be a FAQ.