TAA Tools

The  Check Job  Function command  checks  for an  active  job having  a
specific  Function  type-description as  seen  with  WRKACTJOB such  as
'PGM-xxxx'.   Multiple  jobs may  satisfy the request.   A  job name is
required, but *ALL may  be specified.  Both  the Function type and  the
Function description are optional.

The  Function type and  Function name  can be  seen with  the WRKACTJOB
display  under the  'Function' column heading.   Positions  1-3 are the
Function and positions 5-14 are the Function type.

A typical command would be:


If any active  job XXX  has a  Function of PGM-ABC,  the command  would
complete normally  with a message  for the job.   If more than  one job
satisfies the  request, a summary message is  also sent as a completion

The default  for the  qualified job  name is  *ALL users  and *ALL  job
numbers.  A specific value may be entered for either.

If  no job  exists  for  the XXX  name  or  the Function  PGM-ABC,  the
TAA9891 escape message would occur.

The command may also be entered as:


If an  active job XXX  is in a  delay of any  time, a message  would be
sent describing the job and the delay time.

The  command  may  be entered  without  either a  specific  FUNCTYPE or
FUNCTION as both default to  *ALL.  This provides a quick check  to see
if any jobs are active with the specified name.

             CHKJOBFNC  JOB(XXX)

If an active  job XXX exists, the command  would complete normally with
messages for the job.

Both the job name and the user name may be generic such as:

             CHKJOBFNC  JOB(*ALL/uuu*/jjj*)

The function name may also be generic such as:


If  the FUNCTION  value  is not  a valid  name,  the entire  value must

Group Jobs and System Request Jobs

An inactive Group job  will appear on WRKACTJOB  as GRP-name (F14  must
be used  to display the  additional jobs  at the same  device).   It is
valid  to test for  this.  Note  however, if the  group job  is using a
display command when the group job  is transferred from, it will  still
display GRP-name rather than describe the display.

Similarly with  System Request  jobs that  have been transferred  from.
They will normally appear as PGM-QMNSYSRQS.

CHKJOBFNC escape messages you can monitor for

      TAA9891    The job and Function do not exist

The message  text varies depending on whether there  are no active jobs
or the Function does not exist.

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

CHKJOBFNC Command parameters                          *CMD

   JOB           The  qualified  job  name  of  the  active  job  to be
                 checked.   A job  name is  required.   A specific  job
                 name, a generic name, or *ALL may be entered.

                 The  default  for  the   USER  portion  is  *ALL.    A
                 specific  user  name or  a  generic name  may  also be

                 The default for  the job  number portion is  *ALL.   A
                 specific number may be entered.

                 If all  3 values  are *ALL,  it is  probable that  the
                 number  of jobs will  exceed the  200 internal maximum
                 limit and an  escape message will  be sent before  the
                 FUNCTYPE and FUNCTION  values are checked.   Avoid the
                 use of *ALL for all 3 portions of the job name.

   FUNCTYPE      The  function  type  to  be  checked.    *ALL  is  the
                 default  The Function  Types are described  in the API
                 Work      Management      Attribute       Descriptions
                 documentation.   These have one  byte codes internally
                 that  mostly appear as  3 characters  on the WRKACTJOB
                 display.     It  must   be   one  of   the   following

                        API     Abbrv   Description

                               *ALL    Any function type
                        C      CMD     Command
                        D      DLY     Delay
                        G      GRP     Group job
                        I      IDX     Index build
                        J      JVM     Java virtual machine
                        L      LOG     History log is being written
                        M      MRT     Multiple requester program
                        N      MNU     Menu
                        O      IO      Input/output
                        P      PGM     Program
                        R      PRC     Procedure
                        *       *      Special value
                                         See WRKACTJOB help text

   FUNCTION      A description  of the  Function.   A character  string
                 or  a  generic value  may  be entered.    *ALL  is the
                 default meaning any  Function description.   Up to  10
                 bytes  may   be  entered   to  match   the  value   on

                 A number  may be entered  such as for  a Function type
                 of  DLY.  If  the value is  a name (such  as a program
                 name), a generic value may  be used such as ABC*.   If
                 the  value entered  is not  a valid  name,  the entire
                 value must match.

                 Both  the  Function value  and  the value  as  seen on
                 WRKACTJOB  are   folded  to   upper  case   before   a
                 comparison is made.


The number of jobs that match the JOB parameter may not exceed 200.


The following TAA Tools must be on your system:

     CHKGENERC       Check generic
     EDTVAR          Edit variable
     RTVJOBA2        Retrieve job attributes 2
     RTVJOBSTS       Retrieve job status
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     TRNVAL          Translate value


None, the tool is ready to use.

Objects used by the tool

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

   CHKJOBFNC     *CMD                   TAAJOFJ       QATTCMD
   TAAJOFJC      *PGM       CLP         TAAJOFJC      QATTCL

Added to TAA Productivity tools July 15, 2010

Home Page Up to Top