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



IBM's Command List programming language & Restructured Extended Executor

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

Postby oldnick » Fri Jul 30, 2010 8:01 pm

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     
oldnick
 
Posts: 19
Joined: Wed Apr 21, 2010 1:09 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby oldnick » Fri Jul 30, 2010 8:06 pm

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
oldnick
 
Posts: 19
Joined: Wed Apr 21, 2010 1:09 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Fri Jul 30, 2010 11:25 pm

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'
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post