Joined: 22 Apr 2006 Posts: 6258 Location: Mumbai, India
I'm not a CLIST developer but, out of curiosity, a little search says this:
'Array' is actually a foreign concept to CLIST. Building, maintaining, and handling an array in CLIST is a horrible chore for novices, and isn't much better for the old hands. The number-one problem is resolving the real name of the pseudo-array variable:
SET &ARRAY = &STR(&&ARRAY)
SET &INDEX = 1
SET &ARRAY&INDEX = &STR(THIS IS THE FIRST LINE)
The index must be separately maintained or be algorythmically reproducible in order to fetch the value later, each such element must be separately initialized, and the index value must have the appearance of a single token.
REXX, on the other hand, has 'associative array' as a native concept. That is, a REXX stem array can be indexed by any value: numbers, letters, words, sentences, anything:
ary. = '' /* initializes all ary.x empty */
indexval = "I have two blanks in a row"
ary.indexval = Length(indexval)
The stem array ARY. now has an element indexed by "I have two blanks in a row" which has a value of 27 (the length of "I have two blanks in a row"). The possibilities are endless.
drop ary. /* frees all storage associated with ary.x */
Thanks for your previous reply. I have used compound variable as array.
I am trying to send values in this variable to another CLIST (using nested CLIST). I have used PROC statement to pass the values. However I am not able to pass the values properly, each time I call another CLIST program asks for POSITIONAL PARAMETER.
Please could you let me know how I can send variable value directly to the CLIST.