TAA Tools
SBMCHKACT       SUBMIT CHECK OF ACTIVE JOB             TAAJOFE

The Submit Check of  Active Job command is intended for  the case where
a job should  either 1) Not run longer than n  seconds or 2) Be running
after  n seconds.   A message is  sent to a  specified message queue if
the status is not what is requested.

A typical command would be  inserted into the beginning of a  batch job
that should not run more than n seconds:

             SBMCHKACT   DLYTIM(nnn) STATUS(*INACTIVE)

The command retrieves  the current job name and submits  a batch job to
the  QSYSNOMAX message  queue  (named CHKACTJOB).   When  the CHKACTJOB
job goes  active,  it waits  for nnn  seconds  and then  retrieves  the
status of  the requested job.   If the  status is not  *ACTIVE (meaning
the job  does not exist or is on the  output queue), a message is sent.
The default message queue is QSYSOPR.  The message would read as:

          Job xxx/yyy/zzzzzz should be inactive

A unique message text may be specified.

SBMCHKACT escape messages you can monitor for
---------------------------------------------

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

SBMCHKACT Command parameters                          *CMD
----------------------------

   DLYTIM        The time  to delay  before the  status of  the job  is
                 checked.  It must be in a range of 1 to 999999.

   JOB           The qualified  job name  to be  checked.  The  default
                 is *  meaning the current  job.  A  specific qualified
                 job name may be entered.

   STATUS        The status to be ensured.

                 *INACTIVE  is  the  default  meaning  if  the  job  is
                 active, a message will be sent.

                 *ACTIVE may  be specified  meaning if the  job is  not
                 active, a message will be sent.

   MSGQ          The  qualified name  of the  message queue  to  send a
                 message  to  if  the  specified  status  is  not  met.
                 QSYSOPR  is  the  default.    The  library   qualified
                 defaults to *LIBL.

   MSG           The  message text  to be  sent  if the  status is  not
                 met.   *STD is the default to  generate a message such
                 as:

                    Job xxx/yyy/zzzzzz should be inactive

                 Up to 510 bytes may be entered.

   JOBNAM        A *YES/*NO parameter that  is only used when  specific
                 text is entered for the MSG parameter.

                 *NO is the  default meaning that  the job name  is not
                 added to the specific text.

                 *YES  may be  specified  to add  the job  name  at the
                 beginning   of  the   message  text.     If   *YES  is
                 specified,  and MSG('is  not  active')  is  used,  the
                 actual text of the message would be:

                  'Job nnnnnn/user/job is not active'


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

None.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     RSNLSTMSG       Resend last message
     RTVJOBSTS       Retrieve job status
     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
   ------        ----    ---------      ----------    ----------

   SBMCHKACT     *CMD                   TAAJOFE       QATTCMD
   TAAJOFEC      *PGM       CLP         TAAJOFEC      QATTCL
   TAAJOFEC2     *PGM       CLP         TAAJOFEC2     QATTCL
					

Added to TAA Productivity tools January 15, 2010


Home Page Up to Top