TAA Tools
DSPLSTSPLF      DISPLAY LAST SPOOLED FILE              TAASPMH

The  Display  Last   Spooled  File  tool  supports  three   commands  -
DSPLSTSPLJ  = Displays  the last spooled  file of  a job,  DSPLSTSPLQ =
Displays  the last  spooled file in  an output queue,  and DSPLSTSPLF =
Provides  an  option  for  either  of  the  previous  commands.    This
provides a  simple means of  accessing the spooled information  for the
last function performed.

The  DSPLSTSPLJ  command  allows  a  job  to  be  specified, but  would
normally be entered for the current job as:

              DSPLSTSPLJ

The last spooled  file that exists  for the current  job is  displayed.
Any spooled file with  a status of *FINISHED is  bypassed.  By default,
any spooled file with a status of *HELD or *SAVED are bypassed.

The  DSPLSTSPLQ command  allows an  output queue  to be  specified, but
would normally be entered as:

              DSPLSTSPLQ

This would display the  last spooled file in  the output queue for  the
current job and  user.  By default, any  spooled file with a  status of
*HELD  or *SAVED  are bypassed.   A specific  output queue  and/or user
may also be specified.

The   DSPLSTSPLF   command  defaults   to   provide  the   function  of
DSPLSTSPLJ.   If  prompted for,  DSPLSTSPLF uses  a  TYPE parameter  to
determine which sub function should be performed.

The QUSLSPL API is used to access the list of spooled files.

Creating a shorthand command
----------------------------

Because DSPLSTSPLJ/DSPLSTSPLQ  commands may be used  frequently in your
environment,  it may  be desirable  to create  a shorthand  versions to
simplify keying.

For example, you could  use the command LSTJ and  place it in the  QGPL
library available to all users as a shorthand for DSPLSTSPLJ.

To create LSTJ in QGPL, do the following:

             CRTDUPOBJ      OBJ(DSPLSTSPLJ)
                              FROMLIB(TAATOOL)
                              OBJTYPE(*CMD)
                              TOLIB(QGPL)

                              NEWOBJ(LSTJ)

You  could use  the  command LSTQ  and  place it  in  the QGPL  library
available to all users as a shorthand for DSPLSTSPLQ.

To create LSTQ in QGPL, do the following:

             CRTDUPOBJ      OBJ(DSPLSTSPLQ)
                              FROMLIB(TAATOOL)
                              OBJTYPE(*CMD)
                              TOLIB(QGPL)
                              NEWOBJ(LSTQ)

DSPLSTSPLJ Command parameters                         *CMD
-----------------------------

   JOB           The qualified  job name to be used.   The default is *
                 meaning to use  the current  job.   If a  job name  is
                 entered, both the  user name and job number  must also
                 be entered.

   HELD          Whether  to   include  spooled  files   in  the  'HLD'
                 status.    The default  is *NO  meaning to  bypass any
                 spooled files in the Held status.

                 When a  spooled file is  Held, it  will appear as  the
                 the  last spooled  file in  the output  queue.   Using
                 the  default will avoid  showing a  Held spooled file.

                 *YES may  be specified  in which  case  the last  Held
                 spooled  file (if  any) or  the last  spooled file  in
                 any other status will be displayed.

   SAVE          Whether   to  include  spooled  files   in  the  'SAV'
                 status.   The default  is *NO  meaning to  bypass  any
                 spooled files in the Saved status.

                 When a  spooled file  is specified  as SAVE(*YES),  it
                 remains  on the output  queue in the  normal sequence.
                 The  status  is normally  shown  as RDY  (ready  to be
                 written by  a  writer).   After  the spooled  file  is
                 written by  a writer (printed), the  status changes to
                 'SAV'  and the  spooled file is  placed at  the end of
                 the output  queue.    Using  the  default  will  avoid
                 showing a spooled file in the Saved status.

                 *YES may be  specified in which case  the last spooled
                 file  in a Saved status  (if any) or  the last spooled
                 file in any other status will be displayed.

DSPLSTSPLQ Command parameters                         *CMD
-----------------------------

   OUTQ          The  qualified  name  of   the  output  queue  to   be
                 considered.   The default is  *JOB meaning  the output
                 queue assigned to the job.

                 If an  output queue name is entered  without a library
                 qualifier, *LIBL is assumed.

                 A  library  qualifier  may be  entered.    The special
                 values *LIBL or *CURLIB may be used.

   USER          The user (owner  of the spooled  file) to display  the
                 last  spooled  file  for.   The  default  is  *CURRENT
                 meaning the current user.

                 If  a name is entered other  than the current user (or
                 *CURRENT), the user of  the command must have  *JOBCTL
                 special authority.

                 *ALL may  be entered  to allow  the last  spooled file
                 to be displayed regardless of ownership.

   HELD          Whether   to  include  spooled  files   in  the  'HLD'
                 status.   The default  is *NO  meaning to  bypass  any
                 spooled files in the Held status.

                 When a  spooled file is  Held, it  will appear as  the
                 the  last spooled  file in  the  output queue.   Using
                 the  default will  avoid showing a  Held spooled file.

                 *YES may  be specified  in  which case  the last  Held
                 spooled  file (if  any) or  the last  spooled  file in
                 any other status will be displayed.

   SAVE          Whether   to  include  spooled  files   in  the  'SAV'
                 status.   The default  is *NO  meaning  to bypass  any
                 spooled files in the Saved status.

                 When a  spooled file  is specified  as SAVE(*YES),  it
                 remains  on the output  queue in  the normal sequence.
                 The status is  normally shown as  *READY (ready to  be
                 written  by a  writer).   After  the  spooled file  is
                 written by  a writer (printed), the  status changes to
                 'SAV'  and the  spooled file is  placed at  the end of
                 the  output queue.    Using  the  default  will  avoid
                 showing a spooled file in the Saved status.

                 *YES may  be specified in which case  the last spooled
                 file  in a Saved  status (if any) or  the last spooled
                 file in any other status will be displayed.

DSPLSTSPLF Command parameters                         *CMD
-----------------------------

   TYPE          The type of  display to occur.   The default is  *JOB.
                 If the command  is keyed (not prompted  for) and Enter
                 is pressed, the function of DSPLSTSPLJ occurs.

                 If  the command is prompted  for, assuming the default
                 and pressing Enter  will cause  additional prompts  to
                 be displayed for JOB, HELD, and SAVE.

                 By   entering   TYPE(*OUTQ)   and    pressing   Enter,
                 additional prompts  will be displayed  for OUTQ, USER,
                 HELD, and SAVE.

   JOB           The  qualified job name to be  used.  The default is *
                 meaning to  use the  current job.   If a  job name  is
                 entered, both  the user name and job  number must also
                 be entered.

   OUTQ          The   qualified  name  of  the   output  queue  to  be
                 considered.  The  default is  *JOB meaning the  output
                 queue assigned to the job.

                 If an output  queue name is entered  without a library
                 qualifier, *LIBL is assumed.

                 A  library  qualifier may  be  entered.   The  special
                 values *LIBL or *CURLIB may be used.

   USER          The user (owner  of the spooled  file) to display  the
                 last  spooled  file  for.   The  default  is  *CURRENT
                 meaning the current user.

                 If a  name is entered other than  the current user (or
                 *CURRENT),  the user of the  command must have *JOBCTL
                 special authority.

                 *ALL may  be entered to  allow the  last spooled  file
                 to be displayed regardless of ownership.

   HELD          Whether  to   include  spooled  files   in  the  'HLD'
                 status.   The  default  is *NO  meaning to  bypass any
                 spooled files in the Held status.

                 When a spooled  file is  Held, it will  appear as  the
                 the  last spooled  file in  the output  queue.   Using
                 the  default will avoid  showing a  Held spooled file.

                 *YES may  be specified  in which  case the  last  Held
                 spooled file  (if  any) or  the last  spooled file  in
                 any other status will be displayed.

   SAVE          Whether  to   include  spooled  files   in  the  'SAV'
                 status.    The default  is *NO  meaning to  bypass any
                 spooled files in the Saved status.

                 When a  spooled file  is specified  as SAVE(*YES),  it
                 remains on  the output  queue in the  normal sequence.
                 The  status is normally  shown as *READY  (ready to be
                 written by  a  writer).   After  the spooled  file  is
                 written by a  writer (printed), the status  changes to
                 'SAV'  and the spooled  file is  placed at the  end of
                 the output  queue.    Using  the  default  will  avoid
                 showing a spooled file in the Saved status.

                 *YES may be  specified in which case the  last spooled
                 file in  a Saved status  (if any) or  the last spooled
                 file in any other status will be displayed.

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

None.

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

The following TAA Tools must be on your system:

     CHKJOBCTL       Check job control
     CHKOBJ3         Check object 3
     CRTUSRSPC       Create user space
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   DSPLSTSPLJ    *CMD                   TAASPMH       QATTCMD
   DSPLSTSPLQ    *CMD                   TAASPMH2      QATTCMD
   DSPLSTSPLF    *CMD                   TAASPMH3      QATTCMD
   TAASPMHC      *PGM       CLP         TAASPMHC      QATTCL
   TAASPMHC2     *PGM       CLP         TAASPMHC2     QATTCL
   TAASPMHC3     *PGM       CLP         TAASPMHC3     QATTCL

Structure
---------

DSPLSTSPLF  Cmd
   TAASPMHC3  CL pgm

DSPLSTSPLJ  Cmd
   TAASPMHC   CL pgm

DSPLSTSPLQ  Cmd
   TAASPMHC2   CL pgm
					

Added to TAA Productivity tools August 1, 1998


Home Page Up to Top