Argument count in a routine like $# or $@ in UNIX..

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Argument count in a routine like $# or $@ in UNIX..

Post by prabu »

Hello Folks,
could you please share your expertise on the following:-

1) is there any special variables like $#(in UNIX) to find out the argument count in a routine.

please let me know!

regards,
Pabu
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

DataStage Server Routines are stored in DS_ROUTINES. I posted a job called KgdGenHtmlRoutineDocs which will print a routine out as html. Field 7 is the argument count.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The number of arguments in any DataStage Server Routine (the kind you call from a Routine activity in a job sequence) is fixed, not variable. There ought to be no need to interrogate the number.

In parallel routines, you are in the world of C, so you need argc for the count and *argv for the array of arguments.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Post by prabu »

ray.wurlod wrote:The number of arguments in any DataStage Server Routine (the kind you call from a Routine activity in a job sequence) is fixed, not variable. There ought to be no need to interrogate the number.
I ...
makes sense. just to confirm, the argument type in a routine should always be a scalarit cannot take a dimesnion/vector as the argument , right? . i am exploring the possibilty of making a custom aggregate that concatenates the all the strings passed to it.

Thanks Ray and Kim!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Arguments in DataStage BASIC routines may be scalar, dynamic arrays or (pointers to) dimensioned arrays.

There is no support in the DataStage calling mechanisms for dimesioned arrays, but it is possible in routines called from other routines.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply