whatever solution you receive, no one will ever find it with a search.

what is the size of the second file that you need to read and propogate as a third? If this is a large file (large records or many records) rexx may not be the appropriate tool.

If the second file is potentially large or of vsam type, you would be better off using a REXX script to build the appropriate jcl (dataset name) for a cobol module that would read the second file and write to a third. You could read the cryptic first file, generate the jcl and submit the job which would invoke a module that would better fit the requirements of the copy job (such as sort, iebgener, etc..or a COBOL module if something convoluted must be accomplished..).

Template parsing is great, but if there is more than the number of specified spaces between the two fields it can go horribly wrong. I know because I have spent a couple of hours debugging someone elses code using template parsing.