iCan Blog Archive

You can work with spooled files through a variety of command interfaces: Work with Spooled Files (WRKSPLF), Work with Output Queue (WRKOUTQ), and Work with Job (WKRJOB) option 4 (aka WRKJOB OPTION(*SPLF)). These interfaces have option 1=Send, which can be used to send spooled files to another system; this send option invokes Send Network Spooled File (SNDNETSPLF).

This was a very convenient way to send a spooled file to another system using SNADS when SNA was the networking protocol of choice. SNA, as well as SNADS, is not widely used today. A few clients still use SNA and SNADS, but most have moved away from SNA to exclusively use TCP/IP and use the Send TCP Spooled File (SNDTCPSPLF) command to send spooled files via TCP/IP.

Last fall, a PTF for 7.1, SI50975, was delivered to provide the capability to modify the send option when working with spooled files. Users can now use SNDTCPSPLF rather than SNDNETSPLF. This function was not taken back to 6.1.

To change the behavior to use SNDTCPSPLF rather than SNDNETSPLF, you need to add an environment variable. From the SI50975 PTF cover letter:

To change the “1=Send” option on the WRKSPLF, WRKOUTQ, and WRKJOB
OPTION(*SPLF) panels to use SNDTCPSPLF instead of SNDNETSPLF, add a new environment variable QIBM_SNDSPLF_OPT with a value of ‘TCP’. The environment variable name and its value must be uppercase, and may be set at the *SYS level or *JOB, or both.


After you have added the environment variable, when you select option 1 on the WRKSPLF command, you will now see the prompt for SNDTCPSPLF.

If you are using the Navigator for i Web console, this PTF does not matter since the GUI already provides the ability to send spooled files by both TCP/IP and SNA:

IBM provided this PTF as an ease-of-use enhancement for working with spooled files via the command line interface. You can also extend WRKSPLF yourself by using the UIM Spooled File User-defined List Action (QIBM_QSP_SPLF_LSTACT) exit point, which allows you to define additional list actions on the following green-screen interfaces:

  • • Work with Printer Output (WRKSPLF ASTLVL(*BASIC))
  • • Work with Spooled Files (WRKSPLF ASTLVL(*INTERMED))
  • • Work with Job Spooled Files (WRKJOB OPTION(*SPLF))
  • • Work with Output Queue (WRKOUTQ output queue name)
  • • Work with Spooled File Status (D P or WRKSPLF DSPFMT(*S36FMT))

There is an example program in QUSRTOOL/QATTCL.TSPUIML that uses QIBM_QSP_SPLF_LSTACT to add a ‘C’ option to the WRKSPLF, WRKOUTQ and WRKJOB panels to do a CPYSPLF, and a ‘T’ option to do SNDTCPSPLF. The biggest disadvantage of using this exit program support is the additional list actions do not show up in the “1=Send 2=Change 3=Hold 4=Delete…” options list at the top of the screen.

IBM Support also has a useful article, Adding Options to WRKSPLF, WRKOUTQ and WRKJOB to Invoke the CPYSPLF and SNDTCPSPLF Commands, on using the exit point, which is what you will need to do if you want this capability on the 6.1 release or if you want to add additional options to WRKSPLF.

This blog post was edited to fix broken links on April 1, 2020.

This blog post was originally published on IBMSystemsMag.com and is reproduced here by permission of IBM Systems Media.