REXX macro - To extract the data from PROC to REXX variable



IBM's Command List programming language & Restructured Extended Executor

REXX macro - To extract the data from PROC to REXX variable

Postby chidams78 » Thu Oct 16, 2008 10:01 pm

Hi all,

My reqt is to read a line from PROC and get the contents in a REXX variable till the mentioned text through REXX macro.
If I want to get the symbolic variable used in PROC to be extracted in REXX variable after the qualifier FLDABC, my code will
The PROC line is //TST11IN DD DSN=ABC.TEST.FLDABC&SYMPM,DISP=SHR

Code
PARSE VAR FLDLINE FLDLN1 '.FLDABC&' FLDLN2
where FLDLINE will contain the whole line and FLDLN2 will contain the symbolic variable used after FLDABC qualifier.

The question is whether I can pass the FLDABC dynamically. Means can i store it in any rexx variable and can use it with parse.
The below mentioned code is not working.

TEXT1 = .FLDABC&
PARSE VAR FLDLINE FLDLN1  TEXT FLDLN2


Please suggest me how to solve this.

Thanks
Chidam
chidams78
 
Posts: 17
Joined: Fri Sep 19, 2008 6:35 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX macro - To extract the data from PROC to REXX variable

 

Re: REXX macro - To extract the data from PROC to REXX variable

Postby MrSpock » Fri Oct 17, 2008 1:50 am

Try this:

text = '.FLDABC&'
template = "fldln1 '"||text||"' fldln2 ',' ."
PARSE VAR FLDLINE template
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post