Arguments to DataStage Macros

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: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Arguments to DataStage Macros

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Should be a FAQ.
Mamu Kim
Post Reply