REXX Program – How to write output string from edit find command

Tags:
REXX
In my REXX program how do I write a string of data, found using an edit 'find' command, to the output file? I have used variations of the EXECIO command but it treats my variable names as literals. Pgm follows: /* REXX */ ADDRESS ISREDIT "MACRO PROCESS" /* */ /*********************************************************** */ /* REXX EXEC USING EDIT MACRO COMMANDS: EXTRACTS AND CLEANS */ /* UP JCL/PROC DATA FOR INPUT TO BATCH FLOWCHART PROGRAM */ /*********************************************************** */ "FREE FI(OUTDD)" "ALLOC FI(OUTDD) DA('SC.USER.GLBL.E56.FLOWCHRT') SHR REUSE" RETURN_CODE = 0 /* INITIALIZE RETURN CODE */ out_ctr = 0 /* INITIALIZE # OF LINES READ */ /* */ "EXECIO 0 DISKW OUTDD (OPEN" /* OPEN INDD */ /* */ /* */ ADDRESS ISREDIT "F 'PGM='" ADDRESS ISREDIT (LINDATA) = LINE .ZCSR SAY ABOUT TO ISSUE THE PUSH LNDAT = "LINDATA" PUSH LNDAT SAY FIND DD STMT ADDRESS ISREDIT F ' DD ' ADDRESS ISREDIT (LINDATA) = LINE .ZCSR SAY ABOUT TO ISSUE THE PUSH LNDAT = "LINDATA" PUSH LNDAT SAY SAVED LINE DATA LINDATA /* */ "EXECIO * DISKW OUTDD (FINIS" out_ctr = out_ctr + 1 /* INCREMENT OUTPUT LINE CTR */ "EXECIO 0 DISKW OUTDD (FINIS" /* CLOSES THE OPEN FILE, OUTDD */ SAY 'FILE OUTDD NOW CONTAINS ' out_ctr' LINES.' EXIT 0
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

I believe the following lines need to be changed as shown:
ADDRESS ISREDIT (LINDATA) = LINE .ZCSR
to:
ADDRESS ISREDIT “(LINDATA) = LINE” .ZCSR
and remove the quotes from these lines:
LNDAT = “LINDATA”

to:
LNDAT = LINDATA

Rich

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: