MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Arrays in REXX Panels

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
psridhar
Beginner


Joined: 16 May 2004
Posts: 68
Topics: 26

PostPosted: Mon Apr 18, 2005 9:17 am    Post subject: Arrays in REXX Panels Reply with quote

Hi

I am designing a panel which will have 24 output fields. I will take input from field @PMESG and will go to database. I will get some rows and I have to show them in this panel. The number of fetched rows may be from 0 to any. I have to fill first 24 rows in the output variables and throw the panel. For that I used output variables as ME01, ME02.... ME24.

Can not I use indexed variable (arrays) for this output variables. Its very combusome in my rexx coding to fill or initialize these output variables.

Thanks in advance
Sridhar P

[code:1:f5b4f2c39b])BODY EXPAND(]])
$ PROMPT ASSIST FOR MESSAGE
$ +
$ +
$ +
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Apr 18, 2005 9:36 am    Post subject: Reply with quote

Psridhar,

why not use stem variables?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
psridhar
Beginner


Joined: 16 May 2004
Posts: 68
Topics: 26

PostPosted: Mon Apr 18, 2005 9:48 am    Post subject: Reply with quote

Hi

Thank you very much for the answer.

If I say ME.1 as output variable in the panel, it says

"Variable 'ME.1' is syntactically incorrect."

Please help...

Regards
Sridhar P
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Mon Apr 18, 2005 10:02 am    Post subject: Reply with quote

Consider using the "interpret" command.

If you have a stem variable "me" and your panel variables are defined as ME1, ME2...ME24 then you can initialise them like this:

Code:

   do i = 1 to 24                     
      interpret 'me.i = me'i       
   end                                 
 

_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Mon Apr 18, 2005 10:14 am    Post subject: Reply with quote

I got that back to front. The code above will copy the data from the panel variables to your stem variable. The code below will go the other way.

Code:

   do i = 1 to 24                     
      interpret 'me'i' = me.i'       
   end                                 
             


Embarassed
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
psridhar
Beginner


Joined: 16 May 2004
Posts: 68
Topics: 26

PostPosted: Mon Apr 18, 2005 11:12 am    Post subject: Reply with quote

Hi

Thanks for the help... It works fine.

Sridhar P
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group