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: 16
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: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

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

Postby sergeyken » Thu May 21, 2020 3:25 am

TEXT1 = ‘.’FLDABC’&’
PARSE VAR FLDLINE FLDLN1  (TEXT1) FLDLN2
sergeyken
 
Posts: 96
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 2 times
Been thanked: 9 times

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

Postby sergeyken » Fri May 22, 2020 1:11 am

MrSpock wrote:Try this:

text = '.FLDABC&'
template = "fldln1 '"||text||"' fldln2 ',' ."
PARSE VAR FLDLINE template

Result should be equivalent to:
Template = FLDLINE
sergeyken
 
Posts: 96
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 2 times
Been thanked: 9 times

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

Postby Pedro » Sat May 23, 2020 10:42 pm

Re: the title of this thread - "REXX macro"
and
The question is whether I can pass the FLDABC dynamically.


The poster flirts with the question of how to accept the parameter but perhaps does not know how to ask. You need to use the MACRO statement to accept the parameter.

From the ISPF editor primary command line, the user would type:
%myexec .FLDABC&



/* rexx */
ADDRESS ISREDIT
’MACRO (mysrchtext)
...
PARSE VAR FLDLINE FLDLN1  (mysrchtext) FLDLN2
 
Pedro Vera
User avatar
Pedro
 
Posts: 626
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 44 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post