RE: Can someone post a brexx file i/o example ? (for Sixpack Rexx)
"Rocky" <[email protected]>
| Newsgroups | gmane.comp.emulators.hercules390.vm |
|---|---|
| Message-ID | <[email protected]> |
Mike I think what you want to do is a lot easier than that 1) punch the maclib with the option ( HEADER MEMBER * that will put everything in the reader Then do a readcard * * A will read everything and all the macros and copybooks will be individual files on your a disk with type MEMBER Do a LISTF * MEMBER A (EXEC ARGS You will get a member called CMS EXEC with all the file names Rename them using the CMS exec to MACRO For VM/6 about four of them need to be called copy - they are copy books do that by hand - its only about 4 of the 103 members You can do all that On the SP5 environment Then dump them all to a tape and copy them to the VM/370 enviroment do listf ( EXEC Once for the 99 or macros and once for the 4 or 5 copy books Use the LISTF output to add the macros to your your VM6 maclib ROc _____ From: [email protected] [mailto:[email protected]] On Behalf Of Mike Stramba Sent: Thursday, August 05, 2010 21:41 To: [email protected] Subject: [H390-VM] Can someone post a brexx file i/o example ? (for Sixpack Rexx) 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