You can use a technique called a “Program Described File.”
Basically, you tell RPG to use the format you describe within your RPG. And in your case, you’d tell RPG that your externally described input file was one 712 length record and write that record to your flat file. See examples.
Best wishes: Craig
You can also externally describe a data structure
Ddsname E DS EXTNAME(filename:rcdfmt:*ALL)
This will create a data structure with all the fields in your file as subfields in the data structure. When you read your file, the data structure will be populated. Then you can do whatever you like with the data structure like moving it to a single field that can be written to your flat file.
Do you need to do this in RPG? Would a simple CPYF command be acceptable or is this part of a larger RPG program? If a program-described file is a useful solution, then it seems that a program isn’t even needed.
As for the alternative DS method… Note that if you create a DS that holds the structure of an externally described file, you might not need to ‘move’ anything. You might be able to also define a 712-byte field that overlays the DS. Simply use that field rather than moving the DS to a separate field.