TAA Tools

The Retrieve Job  Status Loop command  allows the current job  to delay
until  another job  is in  a  specified status.   For  example,  if you
submit  a  batch job,  you may  not want  to  continue in  your program
until the batch job is active or on an output queue.

A typical command would be:


The current job  would be  delayed until the  ABC job  is active.   The
defaults are  to check every  5 seconds for  5 iterations.  If  the job
is  still not active after  that time (25  seconds), the TAA9892 escape
message is issued.

If the  job matches  the JOBSTS  requested within  the  delay time  and
number of iterations,  a completion message is  sent.  The text  of the
completion   message   varies  depending   on  whether   the   job  was
immediately found or one or more iterations occurred.

RTVJOBSTSL escape messages you can monitor for

      TAA9892    The job status was not found
      TAA9893    Multiple jobs have the same name
                   (eg. if only a job name was specified)

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

RTVJOBSTSL Command parameters                         *CMD

   JOB           The qualified name of the job to be checked.

                 The job name is required.

                 The user name  and job  number both  default to  *ALL.
                 Either or both may also be entered.

   JOBSTS        The job  status  to be  tested for.    *ACTIVE is  the
                 default.  *JOBQ or *OUTQ may be specified.

   DLYTIM        The  number of  seconds  to delay  before  checking if
                 the  job is in  the requested status.   The default is

                 When  RTVJOBSTSL  begins  processing,  it  immediately
                 checks to see  if the job is in  the requested status.
                 If   not,  it  delays   for  the   number  of  seconds
                 specified and then checks again.

                 This process continues  for the  number of  iterations
                 specified for the ITERATIONS parameter.

   ITERATIONS    The number  of iterations  to occur.   The default  is
                 5.   If the  requested status  is not found  after the
                 number  of  iterations  has  been  met,  the   TAA9892
                 escape message occurs.




The following TAA Tools must be on your system:

     EDTVAR          Edit variable
     RTVJOBSTS       Retrieve job status
     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
   ------        ----    ---------      ----------    ----------

   RTVJOBSTSL    *CMD                   TAAJOGC       QATTCMD
   TAAJOGCC      *PGM       CLP         TAAJOGCC      QATTCL

Added to TAA Productivity tools July 15, 2013

Home Page Up to Top