IBM Support

Adding Options to WRKSPLF, WRKOUTQ and WRKJOB to Invoke the CPYSPLF and SNDTCPSPLF Commands

Troubleshooting


Problem

This document provides information on adding options to the WRKSPLF, WRKOUTQ and WRKJOB commands to invoke the CPYSPLF and SNDTCPSPLF commands.

Resolving The Problem

This document provides information on adding options to the Work with Spooled Files (WRKSPLF), Work with Output Queue (WRKOUTQ) and Work with Job (WRKJOB) commands to invoke the Copy Spooled File (CPYSPLF) and Send TCP/IP Spooled File (SNDTCPSPLF or LPR) commands.

This would be particularly useful because the WRKSPLF, WRKOUTQ, and WRKJOB commands do not have any option for copying spooled files, and Option 1 (Send) uses the Send Network Spooled File (SNDNETSPLF) command to send spooled using SNADS and not using TCP/IP and the LPR/LPD (Line Printer Requester/Line Printer Daemon) protocols.

Starting in V6R1M0 (6.1 or R610) i5/OS, the UIM Spooled File User-defined List Action exit point can be used to define additional list actions on the following green screen interfaces:

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

With this additional support, an exit program can be set up to define additional actions for each of these. For more information on setting up a UIM Spooled File User-defined List Action Exit Program, refer to the topic in the IBM i 6.1 Information Center:

http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/apis/xsp_splf_list_act.htm

Furthermore, the QUSRTOOL library in V6R1M0 (6.1 or R610) i5/OS and above has a sample UIM options list program that provides the function of allowing users to invoke the Send TCP/IP Spooled File (SNDTCPSPLF or LPR) command by taking Option "S" on a spooled file and to invoke the Copy Spooled File (CPYSPLF) command by taking Option "C".

7.1 PTF SI50975 has provided additional function to change Option 1 (Send) option on the WRKSPLF, WRKOUTQ, and WRKJOB OPTION(*SPLF) panels to use the Send TCP/IP Spooled File (SNDTCPSPLF or LPR) command instead of the Send Network Spooled File (SNDNETSPLF) command.

Once this PTF, or a superseding, has been applied, you can add 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. For example:

ADDENVVAR ENVVAR(QIBM_SNDSPLF_OPT) VALUE(TCP) LEVEL(*SYS)

CHGENVVAR ENVVAR(QIBM_SNDSPLF_OPT) VALUE(TCP) LEVEL(*JOB)

To change Option 1 (Send) back to using the Send Net Spooled fileSNDNETSPLF, remove the environment variable, or change its value to something other than 'TCP'. For example:

RMVENVVAR ENVVAR(QIBM_SNDSPLF_OPT)

CHGENVVAR ENVVAR(QIBM_SNDSPLF_OPT) VALUE(SNA) LEVEL(*JOB)


  • - TSPUIMLI (Spool user-defined UIM options list program)



    For more information on the TSPUIMLI (Spool user-defined UIM options list program) sample program in QUSRTOOL, verify that the 6.1 or above version of the QUSRTOOL library has been restored to your system, and then reference the TSPUIMLI member in the QUSRTOOL/QATTINFO file.

    For example, you can use the following Work with Members Using PDM (WRKMBRPDM) command:

    WRKMBRPDM FILE(QUSRTOOL/QATTINFO) MBR(TSPUIMLI)

    and then take Option 5 (Display) on the TSPUIMLI member, or you can use the following Start Source Entry Utility (STRSEU) command:

    STRSEU SRCFILE(QUSRTOOL/QATTINFO) SRCMBR(TSPUIMLI)





    Note: The following is the TSPUIML member from QUSRTOOL/QATTINFO in its entirety, from the 6.1 version of QUSRTOOL:

    TSPUIML Spool user-defined UIM options list program
    ------- -------------------------------------------

    BRIEF DESCRIPTION
    -----------------
    The TSPUIML spool user-defined UIM options list program
    provides the function of allowing the user to invoke the
    SNDTCPSPLF (S) or CPYSPLF (C) commands for a particular
    spooled file simply by keying a 'S' or 'C' option next
    to a spooled file entry when displaying the list panel
    for WRKOUTQ, WRKSPLF, or WRKJOB OPTION(*SPLF). To do this,
    the program must be registered as the exit program for the
    spool user-defined UIM options list exit point QIBM_QSP_SPLF_LSTACT
    format LASP0100 for the alphabetic options 'S' and 'C'.

    INSTALL INSTRUCTIONS
    --------------------

    1.) Create a library to be used for the installation program.
    If an existing library is used, this step can be omitted.
    The characters "crt-lib" will be used to represent
    the installation program library in the following
    commands.

    2.) Create a library to be used for the tool objects. If the
    tool objects and the installation program reside in the
    same library, this step can be omitted.
    The characters "tool-lib" will be used to represent
    the tool object library in the following commands.

    3.) Create the installation program.

    CRTCLPGM PGM(crt-lib/TSPUIMLC) SRCFILE(QUSRTOOL/QATTCL)

    4.) Add the tool object library to the library list.

    ADDLIBLE tool-lib

    5.) Run the installation program to create the tool objects.

    CALL crt-lib/TSPUIMLC PARM(tool-lib)

    The "tool-lib" must exist and must be a part of the
    library list.

    If a tool object already exists in the tool library,
    the tool object will be replaced.

    REMOVAL INSTRUCTIONS
    --------------------

    TSPUIMLD is a program created by the installation program that removes
    objects created by TSPUIMLC (except the program TSPUIMLD).

    To run the delete program enter

    CALL xxxxxxxxxx/TSPUIMLD PARM(yyyy zzzzzzzzzz)

    xxxxxxxxxx is the library where the TSPUIMLD program was created
    yyyy specifies whether you want the tools source deleted from
    QUSRTOOL (*YES) or not (*NO)
    zzzzzzzzzz is the library containing the tools objects you
    wish to delete.

    The installation program TSPUIMLC will be deleted if it resides in the
    tool library.

    OBJECTS USED BY THE TOOL
    -----------------------

    SrcM Name SrcF Name Obj Name Obj Type Ext Attr Description
    -------- --------- -------- -------- -------- ------------
    TSPUIML QATTCL TSPUIML *PGM CL Program for user-
    defined options

    USING THE TOOL
    --------------

    In order for the tool to function, you must first add it as an
    exit program to the necessary exit point and format. This must
    be done once for the 'S' option and once for the 'C' option.

    ADDEXITPGM EXITPNT(QIBM_QSP_SPLF_LSTACT) FORMAT(LASP0100)
    PGMNBR(*LOW) PGM(tool-lib/TSPUIML) PGMDTA(*JOB 1 S)

    ADDEXITPGM EXITPNT(QIBM_QSP_SPLF_LSTACT) FORMAT(LASP0100)
    PGMNBR(*LOW) PGM(tool-lib/TSPUIML) PGMDTA(*JOB 1 C)

    The tool should now be functional. The options 'S' and 'C' should
    now be available to use on the WRKOUTQ, WRKSPLF, and WRKJOB
    OPTION(*SPLF) panels. The options will not be displayed at the
    top of the panel but they should function if used in the option
    field.







For More Information (References)

For more information on copying spooled files, refer to the following document:

N1010238: Using CPYSPLF to Re-Create a Spooled File or Create a PC File

For more information on sending spooled files using TCP/IP and the LPR/LPD protocols, refer to the following documents:

N1019579: Configuration Settings and Error Messages for Remote Output Queues (RMTOUTQs)

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

Historical Number

556522034

Document Information

Modified date:
18 December 2019

UID

nas8N1012369