You can save a spooled file with InterFormNG2 in three manners:
The third option is covered below
If you want to save a spooled file including all spooled file attributes in a save file in the IFS, then you need to get to a command line in a 5250 session on the IBM i.
Here you can use the command:
IFORMNG2/SAVSPLF
The spooled file can be restored with the IFORMNG2/RSTSPLF command.
If you prompt the command with F4, then you are able to see all the parameters of the command:
Save splf to stream file (SAVSPLF) Type choices, press Enter. Spooled file . . . . . . . . . . . . . . . FILE QSYSPRT Name Job name . . . . . . . . . . . . . . . . . JOB * Name, * User . . . . . . . . . . . . . . . . . . Name Number . . . . . . . . . . . . . . . . . 000000-999999 Spooled file number . . . . . . . . . . . SPLNBR *LAST 1-9999, *ONLY, *LAST Job system name . . . . . . . . . . . . . JOBSYSNAME *ONLY Name, *ONLY Spooled file created: CRTDATE Creation date . . . . . . . . . . . . . *ONLY Date, *ONLY Creation time . . . . . . . . . . . . . Time, *ONLY To stream file . . . . . . . . . . . . . . TOSTMF /IFORMNG2/Screenshot.if1_ F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys Bottom
Below a couple of examples illustrate how you can save a spooled file with this command.
One challenge when you use the command
IFORMNG2/SAVSPLF
To get them you can e.g. use the OS400 command, WRKSPLF and then select the spooled file with e.g. option 1. Do not press Enter, but press F4 instead. Then press F14. Now you can see the spooled file identification like below:
Then you select the spooled file identification with the mouse like shown with the yellow frame above, and copy this to the clip board (e.g. with <CTRL> + C).
Now press F12 to get back to the command line and run this command to get multiple entry lines:
CALL QCMD
Now press F11 to get a full screen of entry lines.
Now type in the command
IFORMNG2/SAVSPLF
Now press F4 to prompt the command and fill out the output stream file:
(You can ignore the warning in the bottom of the screen)
Finally you can press Enter to save the spooled file.
Here is a less technical description of how to identify the spooled file identification:
First identify the output queue on which the spooled file is placed. Run the command: WRKOUTQ with the output queue a parameter e.g.
WRKOUTQ PRT01
This will result in a spooled file list like below:
If you press the F11 key once, then you can see the parameters required for the SAVSPLF command in the first 5 columns:
If you here e.g. want to save the first spooled file, then you can do that with this command:
A prerequisite for just specifying the first 5 parameters is, that they are enough to uniquely identify the spooled file, which they normally are.