I have a file delimited with ;. The position of each values in the file is not fixed. There is a particular string that needs to be completely removed, if a match is found in file
File 1
The String REPLACEME1 or REPLACEME2 when found a hit on file 2, it needs to be removed
File 1 and File 2 is joined on 1st 9 bytes. If a match is found between File 1 and File 2, then the string found in file 2 (REPLACEME or REPLACEME2) needs to be removed from File1
Issue #1:
There are no “files” in mainframe architecture.
“Files” (on most of other platforms) consist of long sequence of bytes. Optionally, text “files” may contain virtual “lines” separated by special bytes CR and/or LF, but it is not a requirement.
In mainframes, the “datasets” mandatory consist of “records”, which consist of bytes, either equal or different amount of them in each record. For text data, each “record” is usually considered also as a “line”, without any additional special byte used to separate the “text lines”.
When data are transferred from Windows/Unix/Apple/etc. to mainframe, one needs to know exactly: how logical strings between CR/LF are converted to physical records on mainframe? Depending on the used conversion method different ways of dataset parsing may be needed.
There is also a good chance that the initial “file” did not include any CR/LF, and hence, on mainframe it can be divided into physical records at random positions! It happens in real life, depending on the qualification of the System Architect.