Page 1 of 1

Edit macro, pass a portion of a line into a variable

PostPosted: Fri Jul 30, 2010 8:01 pm
by oldnick
Hey rexx gurus, I've been trying random stuff for 2 hours without succes now so I post this just in case you have the answer.

The following marco code works perfectly but put the entire line into the variable myline.

Is there a way to take only a portion of the line and place it into the variable ?

And yes I looked into the fine manual and in "Edit and Edit Macros z/OS Version 1 Release 5.0"

/* REXX */                                     
ADDRESS ISREDIT                                 
"MACRO PROCESS"                                     
"FIND FIRST 'abc'"
                             
"(MYLINE) = LINE .ZCSR"                         
SAY MYLINE                                     
                                     
"END"                                           
EXIT     

Re: Edit macro, pass a portion of a line into a variable

PostPosted: Fri Jul 30, 2010 8:06 pm
by oldnick
Edit:

And by portion of the line I mean for exemple,
starting from the .ZCRS position to the 5 next characters after the .ZCRS of the line only

Re: Edit macro, pass a portion of a line into a variable

PostPosted: Fri Jul 30, 2010 11:25 pm
by NicC
No, but once in 'myline' you can use the Rexx function SUBSTR to get the portion you want and even re-assign it into 'myline'