Code the output to the disk file the same way as if you were coding to a Printer file.
“O” spec with filename and and EXCEPT name
Follow that with the fields you want to output.
I don’t know if this program will work or not, but it’s close. I didn’t have any “OPM RPG but don’t use the Cycle” examples. I converted an old program to avoid the Cycle and it was harder than I expected. Man… I hadn’t realized how much has changed!<pre>
FSAVF IF F 528 DISK
FOSAVF O F 528 DISK
ISAVF AA 01
I 1 256 SAVF1
I 257 512 SAVF2
I 513 528 SAVF3
C *INLR DOUEQ*ON
C READ SAVF LR
C *INLR IFEQ *OFF
OOSAVF E 01 OS1
O SAVF1 256
O SAVF2 512
O SAVF3 528</pre>This simply takes a savefile and copies its records into a 528-byte PF. I think.
It’s quite a bit shorter using the Cycle in ILE RPG.