15 +++ FREE FILE(Z)
Error running TEST2, line 15: Routine not found
***
And below is the actual Rexx code for my task
000001 /* REXX */
000002 Parse Arg Dsplay
000003 /*********************************************************/
000004 /* Loop through the input file to get printer names. */
000005 /*********************************************************/
000006 trace o
000007 "ALLOC DA('FL1T.LRS.VPSFCB.CNTL(VPSMLIS2)') F(Z) SHR"
000008 ADDRESS MVS "EXECIO * DISKR z (FINIS STEM MYVAR"
000009 DO X = 1 TO MYVAR0
000010 LINE_IN = VALUE('MYVAR'||X)
000011 Parse var line_in Pname Da1 Da2 Da3 Da4 Da5 Da6 Da7 Da8
000012 CALL PROCESS
000013 END
000014
000015 FREE FILE(Z)
000016 Exit
000017
000018 /*********************************************************/
000019 /* */
000020 /* */
000021 /* */
000022 /* */
000023 /*********************************************************/
000024 Process :
000025 IF Pname ¬= '*' Then Do
000026 Say 'Pname = ' Pname
000027 Say 'Da2 = ' Da2
000028 end
000029 Return
000002 Parse Arg Dsplay
000003 /*********************************************************/
000004 /* Loop through the input file to get printer names. */
000005 /*********************************************************/
000006 trace o
000007 "ALLOC DA('FL1T.LRS.VPSFCB.CNTL(VPSMLIS2)') F(Z) SHR"
000008 ADDRESS MVS "EXECIO * DISKR z (FINIS STEM MYVAR"
000009 DO X = 1 TO MYVAR0
000010 LINE_IN = VALUE('MYVAR'||X)
000011 Parse var line_in Pname Da1 Da2 Da3 Da4 Da5 Da6 Da7 Da8
000012 CALL PROCESS
000013 END
000014
000015 FREE FILE(Z)
000016 Exit
000017
000018 /*********************************************************/
000019 /* */
000020 /* */
000021 /* */
000022 /* */
000023 /*********************************************************/
000024 Process :
000025 IF Pname ¬= '*' Then Do
000026 Say 'Pname = ' Pname
000027 Say 'Da2 = ' Da2
000028 end
000029 Return