Can someone post a brexx file i/o example ? (for Sixpack Rexx)
Mike Stramba <[email protected]>
| Newsgroups | gmane.comp.emulators.hercules390.vm |
|---|---|
| Message-ID | <[email protected]> |
What I'd like to know is how to :
1) Open a file for reading (a text/ascii (ok EBCDIC) .. ie. like an EXEC file
1a) Open/create another file for writing
2) read lines till EOF
3) scan for an identifer in the line that was read
4) Write to the second file until that same identifier is found
again, at that point, a new file is opened
The actual app is to convert a MACLIB from VM/sp5 to VM sixpack.
I've done a punch of the maclib from the VM/sp5 system, and have read
the file from the reader, it results in a file like below.
So I need to scan for ":READ" ... write the lines to "GCMD MACRO A",
until the next ":READ" is found
:READ GCMD MEMBER B1 NOSHAD 08/05/10 19:25:27
MACRO GMA00010
&LAB GCMD &A GMA00020
CNOP 0,4 GMA00030
&LAB LA 1,&A GMA00040
LR 0,1 GMA00050
IC 1,*+22 GMA00060
ST 0,*+18 GMA00070
STC 1,*+14 GMA00080
LA 1,*+6 GMA00090
SVC 11 GMA00100
DC CL4'COMD' GMA00110
DC AL1(L'&A) GMA00120
DC AL3(0) GMA00130
MEND GMA00140
:READ GSTOP MEMBER B1 NOSHAD 08/05/10 19:25:27
MACRO GMA00210
&LAB GSTOP GMA00220
CNOP 2,4 GMA00230
&LAB LA 1,*+6 GMA00240
SVC 11 GMA00250
DC CL4'STOP' GMA00260
DC A(0) GMA00270
MEND GMA00280