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
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

macros

Post by srimitta »

Hi Guru's,
some one help me with diffrence between FUNTIONS AND MACROS
Thankyou
ms
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A function is an intrinsic part of the programming language.

A macro is another way to invoke a function, with some or all of the function arguments filled in. DataStage macros are defined in the JOBCONTROL.H file (in the DSINCLUDE directory in the project).

For example, the macro DSJobStatus is replaced, when you compile an expression that uses the macro, with its equivalent function, namely DSGetJobInfo(DSJ.ME,DSJ.JOBSTATUS).

If you examine the generated code, you see the function with which the macro was replaced, rather than the macro itself. It is a task of the job compiler to replace macros with their definitions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

Thanks for your reply. really it helped me.
Post Reply