You can save a spooled file with InterFormNG2 in three manners:
1.Save spooled file as InterFormNG2 document.
2.Save a spooled file without InterFormNG2
3.Save a spooled file into a save file with InterFormNG2
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_
Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
|
The parameters are:
Spooled file
The name of the spooled file, that you want to save.
Job name
The name of the job, that created the spooled file. Here you can use * to refer to the current job name, user and job number.
User
The user, that created the spooled file.
Number
The job number of the job, that created the spooled file.
Spooled file number
Here you can state the spooled file number as a specific number or either the only or last spooled file, that was created by the job selected above.
If you e.g. have selected the current job with *, then you can use the *LAST value to select the last spooled file with the specified name, that was generated by the current job.
Job system name
The name of the system (IBM i), where the spooled file was generated. Normally the default value *ONLY can be used. You only need to specify the name, if there are multiple spooled files with the same name, job and spooled file number, so that those cannot uniquely identify a spooled file.
Creation date
The date when the spooled file was created. The use is for the same as the job system name.
Creation time
The time when the spooled file was created. The use is for the same as the job system name.
To stream file
The path and name of the stream file to be created. If the stream file already exist, then the command will fail with the error:
CPA0A0: Object already exists. Object is /iformng2/screenshot.if1. You can decide yourself for the extension of the stream file. In the example above the extension .if1 is used as this is the extension used by InterForm400.
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 is the identification of the spooled file i.e. the spooled file name, the job and the spooled file name. There is however a trick to get those identifiers for a spooled file.
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 in the top of the screen and then paste the clip board contents next to the command like below:
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.
Example2
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.