TAA Tools

The Display Submitted Jobs  command provides a display that  is similar
to that  provided by the system WRKSBMJOB command  except that the user
cannot  perform actions against the jobs.   An option exists to allow a
display of any spooled  files associated with the  job.  An outfile  is
optional.    DSPSBMJOB may  be  helpful if  you  have  a menu  oriented
system  and want  to prevent  users from  changing, holding,  or ending
batch jobs.

The model file is TAAJOCDP with a format of SBMJOBR.

The intent  of  the command  is  that it  would  be  used in  place  of
WRKSBMJOB  as an  option  on a  user  menu.   No  command line  exists.
However, if  the spooled file option is  specified, a command line does
exist on the system spooled file display.

A typical command would be:


This displays the  jobs submitted  by the  current user  in job  number
order.   The  display  that  appears is  similar  to that  provided  by
WRKSBMJOB,  but would  only allow  the option  to display  more details
about the job or to work with the spooled files of the job.

The  SPLF parameter allows control of  whether the user will be allowed
to see any spooled files  of a submitted job, just display  the spooled
files, or have the full capability of WRKJOB OPTION(*SPLF).

The  SPLF option *PGM  may also  be used  to run  a user  exit program.
The  intent of this  function is to  be able  to do a  function such as
the TAA WRKALLSPLF command.  See the later discussion.

The APIs used include:

       - QUSCRTUS
       - QUSLJOB
       - QUSRTVUS
       - QUSRJOBI

Ascending or Descending option

F6  may  be  used  to  flip/flop  the  display  between   ascending  or
descending  order  of  Job  Numbers.   The  display  first  appears  in
'Ascending order'  (described in the upper right  hand corner) with the
F6 text at the bottom of the display allowing for 'Descending'.

If F6 is  pressed, the display is  refreshed so the  text in the  upper
right hand corner  indicates 'Descending sequence'  and the F6  text at
the bottom becomes 'Ascending'.

The F6  option is not  valid if the  Job Numbers retrieved  have rolled
over from 999999 to 000001.

Spooled file handling program

By  specifying  SPLF(*PGM)  and  naming  a  user  exit  program  in the
SPLFPGM parameter, a  user program  can be used  instead of the  system
functions to process spooled files.

The TAA WRKALLSPLF  command may be used to allow a  user defined set of
options and command keys.

The user program is passed 3 parameters:

       - Job name            *CHAR LEN(10)   Requested job name
       - Job user            *CHAR LEN(10)   Requested job user
       - Job number          *CHAR LEN(6)    Requested job number

A typical program would be coded as:

             PGM        PARM(&JOB &USER &JOBNBR)
             DCL        &JOB *CHAR LEN(10)
             DCL        &USER *CHAR LEN(10)
             DCL        &JOBNBR *CHAR LEN(6)

Other   options  could   be  specified   on  the   WRKALLSPLF  command.
Specifying the qualified  job name  causes only the  spooled files  for
the named job to be displayed.

A demonstration program  is available using the above code.   Invoke it


Command parameters                                    *CMD

   SBMFROM       The type  of submitted jobs to be  displayed.  This is
                 the same  parameter  as  on WRKSBMJOB,  but  the  only
                 value is  *USER which displays  the jobs  submitted by
                 the current user.

                 The  parameter exists  to allow  for  future expansion
                 if  the system APIs provide for  a rapid access to the
                 WRKSBMJOB functions of *WRKSTN and *JOB.

   SPLF          Whether to  allow the  user  to display  or work  with
                 the  spooled  files  of   the  submitted  jobs.    The
                 default  is *WRK which  causes the  function of WRKJOB
                 JOB(xxx) OPTION(*SPLF)  to be  used.   The user  would
                 have full  control to display,  change, or  delete the
                 spooled  files in  addition to  being able  to respond
                 to spool messages.

                 *DSP  may  be  specified  to  cause  the  function  of
                 DSPJOB JOB(xxx)  OPTION(*SPLF) to be  used.   The user
                 can  only display  the spooled  files  associated with
                 the job.

                 *PGM  may be  specified if a  program is  named in the
                 SPLFPGM parameter to allow  a user program to  process
                 the spooled  files.  The  intent of this  parameter is
                 to  allow  a  function  such  as  the  TAA  WRKALLSPLF
                 command to be  used.   See the  previous comments  for
                 how to write the program.

                 *NONE may  be specified to  prevent the user  from any
                 access to the spooled files of the job.

   SPLFPGM       The  qualified  name of  the user  program  to process
                 spooled files.   The  default is  blank for  both  the
                 program  and library  name.   If  a  name is  entered,
                 SPLF(*PGM)  must   be  specified.     If  the  library
                 qualifier is blank, *LIBL is assumed.

                 See  the  previous discussion  for the  parameter list
                 passed to the program and sample code.

   OPTION8TXT    The  constant  to   be  displayed  if   SPLF(*PGM)  is
                 specified.   The default is  *DFT meaning the  name of
                 the program will be displayed.

                 A  value  may be  entered such  as  '8=Display spooled

   OUTPUT        The type of  output.  *DSP is  the default to  display
                 the output.

                 *OUTFILE may  be entered to  create an outfile  of the

   OUTLIB        The   library  to  be  used   if  OUTPUT(*OUTFILE)  is
                 specified.  *LIBL is  the default and  may be used  if
                 the SBMJOBP file  already exists on the  library list.

                 A specific library may be entered.

   OUTMBR        The  member  to   be  used  in  the  SBMJOBP  outfile.
                 *FIRST is the default.

                 A specific member may be named.

   REPLACE       Whether  to  replace the  data  in the  member  of the
                 outfile.  *YES is the default.

                 *NO may  be  specified to  add  data to  the  existing


A maximum of 9999  jobs can be displayed or output to  the outfile.  If
the  limit  is  exceeded,  a  message  appears  on  the  first  display
informing the user that not all jobs are shown.


The following TAA Tools must be on your system:

     CVTDTS          Convert date/time in *DTS format
     DUPTAADBF       Duplicate data base file
     EDTVAR          Edit variable
     FILEFDBCK       File feedback
     HLRMVMSG        HLL Remove message
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message


None, the tool is ready to use.

Objects used by the tool

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

   DSPSBMJOB     *CMD                   TAAJOCD       QATTCMD
   TAAJOCDC      *PGM       CLP         TAAJOCDC      QATTCL
   TAAJOCDC11    *PGM       CLP         TAAJOCDC11    QATTCL
   TAAJOCDC12    *PGM       CLP         TAAJOCDC12    QATTCL
   TAAJOCDR      *PGM       RPG         TAAJOCDR      QATTRPG
   TAAJOCDP      *FILE      PF          TAAJOCDP      QATTDDS

The  CL  program  TAAJOCDC12  is   a  demo  function  of  the   SPLFPGM

Added to TAA Productivity tools June 1, 1997

Home Page Up to Top