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 

use of rexx proc

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


Joined: 29 Dec 2009
Posts: 1
Topics: 1

PostPosted: Thu Jan 07, 2010 3:44 pm    Post subject: use of rexx proc Reply with quote

I have the following code and it works perfectly to me.

Code:
/*REXX*/

call procedure pro01
say gr.1
say gr.2

exit

pro01: procedure expose gr.
gr.0=2
gr.1=a
gr.2=b
return


Now, i need to use the same gr. array into another procedure "pro02" which will be called after the "say" statements.
But i keep receiving a msg saying the array is empty. Should this array be declared in another way ?
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Thu Jan 07, 2010 4:34 pm    Post subject: Reply with quote

I got a syntax error on the 'call'. I just deleted the word 'procedure' from your call statement and it all worked fine for me.

Code:

/*REXX*/                         
call pro01                       
say gr.1                         
say gr.2                         
call pro02                       
say gr.1                         
say gr.2                         
exit                             
pro01: procedure expose gr.     
gr.0=2                           
gr.1=a                           
gr.2=b                           
return                           
pro02: procedure expose gr.     
gr.1=x                           
gr.2=y                           
return                           


Btw, REXX really doesn't support arrays. The variables you're using are compound symbols and stems.
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