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
 

 

PARSE ARG in a REXX

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

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Tue Jan 24, 2012 9:57 pm    Post subject: PARSE ARG in a REXX
Reply with quote

I know you can bring in variables by using PARSE ARG at the beginning of REXX.

Code:

/*   REXX  */
PARSE ARG FIELD1 FIELD2 FIELD3 FIELD4 FIELD5
IF FIELD1 = 'XXX' THEN DO NOP
exit


When running a REXX in batch and passing information to a PARSE ARG statement, is there any method of continuation available to pick up all the symbolic values if their contents won't fix on a 72 position JCL statement?

Code:

//REXX    EXEC PGM=IKJEFT01,DYNAMNBR=10     
//SYSTSPRT DD  SYSOUT=*                     
//SYSEXEC  DD  DSN=HLQ.REXX.LIB,DISP=SHR
//SYSPROC  DD  DSN=HLQ.REXX.LIB,DISP=SHR
//SYSPRINT DD  SYSOUT=*                     
//SYSTSIN  DD  *                           
PROFILE NOPREFIX                           
REXXPGM FIELD1VALUE FIELD2VALUE FIELD3VALUE etc.
Back to top
View user's profile Send private message

cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Tue Jan 24, 2012 10:24 pm    Post subject: Reply to: PARSE ARG in a REXX
Reply with quote

After several tests, I determined you simply put a - (dash) at the end of the first JCL statement and it does continue.

Stored as TESTALL
Code:

/********************** REXX *************************/   
PARSE ARG FIELD1 FIELD2 FIELD3 FIELD4 FIELD5               
SAY FIELD1                                                 
SAY FIELD2                                                 
SAY FIELD3                                                 
SAY FIELD4                                                 
SAY FIELD5                                                 
EXIT                                                       


Code:

//REXX    EXEC PGM=IKJEFT01,DYNAMNBR=10                       
//SYSTSPRT DD  SYSOUT=*                                       
//SYSEXEC  DD  DSN=HLQ.REXX.LIB,DISP=SHR                   
//SYSPROC  DD  DSN=HLQ.REXX.LIB,DISP=SHR                   
//SYSPRINT DD  SYSOUT=*                                       
//SYSTSIN  DD  *                                               
PROFILE NOPREFIX                                               
TESTALL APPLE_ORCHARD PEAR_ORCHARD KIWI_ORCHARD ORANGE_GROVE -
 PEACH_ORCHARD                                             
/*                                                             
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Jan 24, 2012 10:35 pm    Post subject: Reply to: PARSE ARG in a REXX
Reply with quote

reading the manuals will prevent everybody from posting misleading suggestions
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJ4BK90

use a + or a - as continuation indicator
a + will drop the spaces between the <parameters> a - will not
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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