>I am using now a different separator character ....

Another way to accomplish this is to enclose the whole set of parameters in 
quotes or double quotes, thereby creating a single string parameter. You can 
keep the comata as separators *within* the string.

In the receiving code parse the single argument and use "," to specify the 
separator.

The drawback is that you cannot use arg() to find out how many have been passes 
(if this is variable). You would need to count yourself.
(NOTE: leading dots are there to indent text)
/* remove enclosing quotes or double quotes *//* assumes quotes or double 
quotes are used correctly *//* more code is needed to cope with unexpected data 
*/
parm = strip( strip( arg( 1 ), "B", "'" ), "B", '"' )

do ii = 1 while parm <> "".. parse var parm parm.ii "," parm.. end
parm.0 = ii - 1 /* parm.0 now has the number of parameters passed */
/* note that spaces around the comma will be kept *//* as leading and/or 
trailing spaces in the stem variables */
say parm.0 "parameters have been passed"
do ii = 1 to parm.0.. say "parameter" ii "is: >" || parm.ii || "<".. end


--Peter Hunkeler




----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to