TAA Tools
SELSPLF         SELECT SPOOLED FILE                    TAASPOL

The Select  Spooled File command  must be  invoked from an  interactive
CL program.   It displays  the spooled files  for the current  or named
user   and  allows  the  selection  of   one  spooled  file.    The  ID
information about  the  spooled  file is  passed  back to  the  calling
program.  The QUSLSPL API is used to determine the spooled files.

A simple test program exists that may be invoked with:

             CALL   TAASPOLC3

The SELSPLF display appears as:

*********************************************************************

                          Select Spooled File - TAA

 Type options, press Enter.
   1=Select   5=Display   8=Attributes

 Opt  File        User        Dev/Queue   User data   Sts   Pages
  _   QPDSPSBS    USERA       QPRINT                  RDY       1
  _   QPDSPSTS    USERA       QPRINT                  RDY       1

 F3=Exit    F5=Refresh    F11=View 2    F12=Cancel    ...

 Select one spooled file or cancel with F3/F12.

*********************************************************************

Assume  that an interactive  program wants  the user  to select  one of
his  spooled files to be operated  on.  The following  could be used in
a CL program:

             DCL        &RTNJOB *CHAR LEN(10)
             DCL        &RTNUSER *CHAR LEN(10)
             DCL        &RTNJOBNBR *CHAR LEN(6)
             DCL        &RTNSPLF *CHAR LEN(10)
             DCL        &RTNSPLNBR *CHAR LEN(6)
              .
             SELSPLF    RTNJOB(&RTNJOB) RTNUSER(&RTNUSER) +
                          RTNJOBNBR(&RTNJOBNBR) RTNSPLF(&RTNSPLF) +
                          RTNSPLNBR(&RTNSPLNBR)
             MONMSG     MSGID(TAA9894) EXEC(DO) /* None selected */
                        /*                                        */
                        /*    Your handling of none selected      */
                        /*                                        */
             ENDDO      /* None selected */

The calling  program can now  use the  return variables  to operate  on
the  spooled file  such as  sending it  to another  user, printing  it,
etc.

SELSPLF escape messages you can monitor for
-------------------------------------------

      TAA9894    No selection was made.

Escape messages from based on functions will be re-sent.

SELSPLF Command parameters                            *CMD
--------------------------

   OUTQ          The   qualified  name  of  the   output  queue  to  be
                 displayed to allow a selection of a spooled file.

                 *ALL is the default to  allow all output queues to  be
                 used.   If *ALL  is specified,  the library  qualifier
                 must be blank.

                 If a  specific output queue  is named and  the library
                 qualifier  is  blank,  *LIBL  is  assumed.    Either a
                 specific  library  name,  *LIBL,  or  *CURLIB  may  be
                 entered.

   USRPRF        The  user   profile  to  select   spooled  files  for.
                 *CURRENT is the default meaning the current user.

                 *JOBCTL  special authority is required  to name a user
                 profile other than yourself.

   RTNJOB        The return  job  name  of  the job  that  created  the
                 spooled file.   This  is an  optional return  variable
                 that if used must be specified as *CHAR LEN(10).

   RTNUSER       The  return  user name  of  the job  that  created the
                 spooled file.   This  is an  optional return  variable
                 that if used must be specified as *CHAR LEN(10).

   RTNJOBNBR     The return  job  number of  the job  that created  the
                 spooled  file.   This is  an optional  return variable
                 that if used must be specified as *CHAR LEN(6).

   RTNSPLF       The  return  spooled  file  name  that  was  selected.
                 This is  an  optional  return variable  that  if  used
                 must be specified as *CHAR LEN(10).

   RTNSPLNBR     The  return spooled  file  number  that was  selected.
                 This  is  an  optional return  variable  that  if used
                 must be specified as *CHAR LEN(6).


Restrictions
------------

Because SELSPLF returns variables and  uses a display, the command  may
only be used in a CL program.

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKJOBCTL       Check *JOBCTL special authority
     CHKOBJ3         Check object 3
     CHKSPLF         Check spooled file
     CVTDAT          Convert date
     DSPSPLFA        Display spooled file attributes
     FILEFDBCK       File feedback
     RSNLSTMSG       Resend last message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   SELSPLF       *CMD                   TAASPOL       QATTCMD
   TAASPOLC      *PGM       CLP         TAASPOLC      QATTCL
   TAASPOLC2     *PGM       CLP         TAASPOLC2     QATTCL
   TAASPOLC3     *PGM       CLP         TAASPOLC3     QATTCL
   TAASPOLR      *PGM       RPG         TAASPOLR      QATTRPG
   TAASPOLD      *FILE      DSPF        TAASPOLD      QATTDDS

The TAASPOLC3 program is a simple test program.
					

Added to TAA Productivity tools August 1, 2008


Home Page Up to Top