Terry,

OK - I'm no REXX expert, so take this for what it's worth:

In the technical/classical sense of arrays, REXX does not have any support of 
arrays per se - either single or multi-dimensional. When I was using Fortran 
you had:

Dimension array(10,10)
Do I = 1 to 10
Do X = 1 to 10
Array(I,X) = some value
End
End

Instead, Rexx has STEM variables that can be made to work as arrays:

Do I = 1 to 10;
Stemvar.I = some value;
End;

This makes STEM variables 'look' like arrays. However, REXX and STEM variables 
are perfectly happy with saying

Stemvar.5 = some value

The above only creates the STEM variable 'stemvar.5' and assigns it some value. 
Note there is no STEM variable of 'stemvar.1/2/3/4/6/7/8/9/10'. Only 
'stemvar.5' exists.

Also, please save yourself some embarrassment when talking to anyone who is a 
REXX bigot/user and NEVER - NEVER say that stem variables are arrays. Doing so 
causes you life-long shame.

HTH

HITACHI
 DATA SYSTEMS 
Raymond E. Noal 
Senior Technical Engineer 
Office: (408) 970 - 7978 

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Terry Sambrooks
Sent: Tuesday, March 17, 2009 3:09 PM
To: [email protected]
Subject: Multi-dimensional arrays in REXX

Hi,

I have done a search of the archives, and read the relevant REXX manuals and
am left with a need for a second opinion on my conclusion.

The question I have been asked relates to whether REXX supports
multi-dimensional arrays. There is a lot of discussion in the manuals about
single dimension arrays a.k.a. STEM variables, but additional dimensions are
not covered which leads me to conclude that multi-dimensional arrays are not
supported.

I know this question is better directed at the REXX New Group, but I feel
sure that there is enough expertise available here to confirm my assessment
or correct any erroneous view I may have formed.

Kind regards - Terry


Terry Sambrooks
Director
KMS-IT Limited
228 Abbeydale Road South
Dore, Sheffield, S17 3LA, UK

Tel: +44 (0)114 262 0933
WEB: www.legac-e.co.uk

Company Reg: 3767263 at the above address

All outgoing E-mail is scanned, but it remains the recipient's
responsibility to ensure their system is protected from spy-ware, trojans,
viruses, and worms.  

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to