Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is ARRAY concept available in CLIST?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
aditi panse

New User


Joined: 19 May 2009
Posts: 9
Location: Poona

PostPosted: Tue May 19, 2009 11:22 am    Post subject: Is ARRAY concept available in CLIST?
Reply with quote

Is ARRAY concept available in CLIST? If yes, what is the SYNTAX for the same. Thanks.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue May 19, 2009 12:26 pm    Post subject:
Reply with quote

I'm not a CLIST developer but, out of curiosity, a little search says this:
Quote:
'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 */
Back to top
View user's profile Send private message
aditi panse

New User


Joined: 19 May 2009
Posts: 9
Location: Poona

PostPosted: Thu May 21, 2009 6:02 pm    Post subject:
Reply with quote

Thanks Anuj, really helped me a lot...
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu May 21, 2009 6:09 pm    Post subject:
Reply with quote

You're welcome, hope you are making progress . . . icon_smile.gif
Back to top
View user's profile Send private message
aditi panse

New User


Joined: 19 May 2009
Posts: 9
Location: Poona

PostPosted: Tue Jun 02, 2009 12:53 pm    Post subject: Reply to: Is ARRAY concept available in CLIST?
Reply with quote

Hi Anuj,


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.

I hope my query is clear.

Thanks,
Aditi
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts how to find clist's or view library Andrew Hsia CLIST & REXX 4 Tue Jun 28, 2016 6:07 pm
No new posts Unstring list of values into an array. Roshnii COBOL Programming 8 Mon Jun 27, 2016 6:25 pm
No new posts 2 same CLIST pgm but with different n... boyti ko CLIST & REXX 5 Fri Jun 03, 2016 4:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us