I have a requirement like this:
Read a file (actually a text file uploaded to mainframe) line by line and copy next 8 bytes when a particular word is found in the record. E.g., if the input file is like the one below then the REXX code should give next 8 characters whenever say â€œProgram:â€ is encountered i.e. output file for the below input file should have 2 records- M002233 and M1254789.
The purpose of this section is to put in ..
The purpose of this section..
The purpose of Program:M1254789
Note: position of tag like â€˜Program:â€™ in above sample file is NOT fixed.
How to do this?