Fellow Programmers:
I have written a rexx exec to scan records in a dataset in vm/cms mainframe, and write certain records to an output file.
I am unable to succesfully write records to an output flat file (RECFM=F, LRECL=80). The problem is the output file contains the value "SLINE.1" on every line.
Can anyone help me straighten out the confusion over the "stem line.i" stuff? I think that is causing this mess.
Thanks!
TomsWeb
Here is the code...
SIGNAL ON ERROR
'EXECIO * DISKR TESTF FILE A (FINIS STEM IN.'
IF RC=2 THEN LEAVE
J = 0
LOOPA:
DO I = 1 TO IN.0
LINE = IN.I
PARSE VAR LINE V1 V2 .
LX=LINE.I
/* LZ = SUBSTR(LX,6,2)
SAY "LINE"LZ V2 . */
IF V2 = "CAR"
THEN OUT.J = V2
SAY OUT.J J
SIGNAL WRITEX
END
EXIT
WRITEX:
OUT=LABEL.J
'EXECIO 1 DISKW TOMMY FILE A 0 F 72 (FINIS STEM OUT.'
J = J + 1
I = I + 1
SIGNAL LOOPA
EXIT
RETURN 0
I have written a rexx exec to scan records in a dataset in vm/cms mainframe, and write certain records to an output file.
I am unable to succesfully write records to an output flat file (RECFM=F, LRECL=80). The problem is the output file contains the value "SLINE.1" on every line.
Can anyone help me straighten out the confusion over the "stem line.i" stuff? I think that is causing this mess.
Thanks!
TomsWeb
Here is the code...
SIGNAL ON ERROR
'EXECIO * DISKR TESTF FILE A (FINIS STEM IN.'
IF RC=2 THEN LEAVE
J = 0
LOOPA:
DO I = 1 TO IN.0
LINE = IN.I
PARSE VAR LINE V1 V2 .
LX=LINE.I
/* LZ = SUBSTR(LX,6,2)
SAY "LINE"LZ V2 . */
IF V2 = "CAR"
THEN OUT.J = V2
SAY OUT.J J
SIGNAL WRITEX
END
EXIT
WRITEX:
OUT=LABEL.J
'EXECIO 1 DISKW TOMMY FILE A 0 F 72 (FINIS STEM OUT.'
J = J + 1
I = I + 1
SIGNAL LOOPA
EXIT
RETURN 0