TAA Tools
CHKJOBMSGW      CHECK JOB MESSAGE WAIT                 TAAJOEZ

The Check Job  Message Wait command  allows you to send  a notification
when  a job  is waiting  for  a response  to an  inquiry  message (MSGW
status).    The notification  can be  one or  more of  1) Send  a break
message to  a message  queue on  the current  system, 2)  Send a  break
message to  a workstation  on a different  system (using FTP),  3) Send
an Email to a user (using TAA tool SNDTXTMAIL)

A typical command would be:

            CHKJOBMSGW  SBS(xxx) WAKEUP(600) MSGQ(*YES)
                         REPEAT(1800) BRKMSGQ(yyy)

A  never ending job would be submitted  to the QSYSNOMAX job queue with
the name CHKJOBMSGW.   It would wakeup  every 600 seconds (10  minutes)
and  check  the  status  of  jobs   in  the  named  subsystem  (or  all
subsystems).   By default, only batch  jobs are checked.   If a job was
in a MSGW status, a  break message would be  sent to the message  queue
named in the BRKMSGQ parameter.

The REPEAT parameter determines  how often the message will  be resent.
If  the same  job is still  in a  MSGW status  (with the  same function
value  as seen by WRKACTJOB)  after the CHKJOBMSGW job  wakes up at the
next WAKEUP  interval,  the  time of  the  last notification  plus  the
REPEAT time  is compared to  the current time.   If the REPEAT  time is
greater  than the time  of the last  notification, another notification
is sent.   Thus the REPEAT  parameter allows you  to control  excessive
notification.  The default is 1800 seconds or 30 minutes.

By  default, the  break message  will be  sent  as soon  as the  wakeup
interval  occurs and a job  is in the  MSGW status.   This could happen
within a few seconds of  the job entering the  MSGW status.  An  option
exists with the  SKP1STNDF parameter to  skip the sending of  the first
notification.   This may allow  normal system operations  to respond to
the message and prevent any notification.

Multiple  CHKJOBMSGW jobs  may be  active for  unique subsystems.   For
example, you  could have  a  different notification  type depending  on
the subsystem where the job was running.  that may be sent.

The  following describes  the types  of notifications  in  more detail.
You may specify one or more of the types.

FTP notification
----------------

You  may send  a break message  to a  workstation on  another system if
you have  an FTP connection.   The  FTP2 TAA  Tool command  is used  to
send the notification which is a SNDBRKMSG command.

The remote system  must have an i5/OS operating system  and the current
user must have a profile of the same name on the other system.

When  FTP is  used,  a password  must be  sent for  the  user.   If the
source for  a  CHKJOBMSGW command  is  placed  in a  source  file,  the
password would  be viewable by  all users authorized  to the file.   To
prevent this exposure,  the RTVMSKPWD tool is used.   This allows up to
99  passwords for a specific user to be  stored in a masked manner in a
file in  TAASECURE.   When  using CHKJOBMSGW,  the MSKPWDNBR  parameter
must  identify  which  masked  password   should  be  used.    See  the
discussion with RTVMSKPWD.

E-Mail notification
-------------------

You  may send an E-Mail  to another system.   This is  done via the TAA
Tool  SNDTXTMAIL.    You  must  have  a  proper  configuration  to  use
SNDTXTMAIL.    You must  have  a  entry  in  a MAILADRP  file  for  the
identified  user which is  used to determine  the E-Mail address.   See
the discussion with the MAILADR tool.

Break message notification to a user on the current system
----------------------------------------------------------

You may send a  break message to a  workstation on the current  system.
The SNDBRKMSG command is used.

ENDJOBMSGW Command
------------------

The ENDJOBMSGW  command is  also supported  and allows the  job to  end
normally.   The command will  request the specified  job to end  with a
delay time of 150 seconds.

The  ENDJOBMSGW job  wakes up  every 2 minutes  (or less  if the WAKEUP
time is less than 2 minutes)  and checks to see if a  controlled cancel
is set.  If so it ends the job normally.

CHKJOBMSGW escape messages you can monitor for
----------------------------------------------

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

ENDJOBMSGW escape messages you can monitor for
----------------------------------------------

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

CHKJOBMSGW Command parameters                         *CMD
-----------------------------

   SBS           The  name   of  the  subsystem  to  be   checked.    A
                 qualified  library name may  be entered.   The default
                 is *LIBL.   Only the jobs  in the specified  subsystem
                 are considered and the subsystem must be active.

   WAKEUP        The wakeup  interval for the  batch job.   The default
                 is 600 seconds (10 minutes).

                 At  the end  of  the wakeup  period, the  jobs  in the
                 named subsystem(s) are  checked for a  status of  MSGW
                 (message wait).

                 The text  of the notification  is the  same regardless
                 of  which notification type  is used  (one or  more of
                 MSGQ, FTP, or EMAIL parameters must be *YES).

                 The notification would appear as follows:

                      The CHKJOBMSGW command has found job
                      xxx/yyy/zzz with a status of MSGW on system
                      xxx on mm/dd at hh:mm AM (or PM).

   EMAIL         A  *YES/*NO  parameter  for  whether  E-Mail  will  be
                 used.  *NO is the default.

                 If  *YES is  specified,  the EMAILUSR  parameter  must
                 describe the  user name  to send Email  to.   The name
                 must  be  specified  in  the  MAILADRP  file (see  the
                 MAILADRLIB parameter) and  a valid mail  configuration
                 must  exist.   See  the  discussion with  the  MAILADR
                 tool.   The TAA  Tool SNDTXTMAIL  is used to  send the
                 notification.

   FTP           A *YES/*NO  parameter for  whether FTP  will be  used.
                 *NO is the default.

                 If *YES  is specified, the  TAA FTP2 command  is used.
                 The  remote  system   must  have  an  i5/OS  Operating
                 System  and the  current user  must have  a profile of
                 the same  name  on the  remote  system.   A  SNDBRKMSG
                 command will  be sent if notification is  needed.  You
                 must fill in the parameter for RMTSYS.

                 FTP  requires that a  password be sent  for the remote
                 user.  Since  it is expected that  you will place  the
                 CHKJOBMSGW command  in a form  where it can  be re-run
                 without  re-entering   all  the  parameters  (such  as
                 using a job  schedule entry  or a CL  program), it  is
                 not  desirable  to  have  a   password  which  can  be
                 displayed.

                 Instead  of  requiring  a  password,  the  FTP  option
                 requires  that the TAA RTVMSKPWD  tool be used for the
                 MSKPWDNBR  parameter.    You  should  review  what  is
                 required  for this  tool  by  using DSPTAA  RTVMSKPWD.
                 The  user of  CHKJOBMSGW must  have a  masked password
                 by entering the CHGMSKPWD command.

                 The MSKPWDNBR  parameter  defaults  to 1.    An  error
                 will  occur if  there is  no masked  password for  the
                 MSKPWDNBR of the current user.

                 If  the  workstation  on  the  remote  system  is  not
                 signed on, no error occurs.   The message will  remain
                 in the message queue.

   MSGQ          A *YES/*NO  parameter for whether  a message  queue on
                 the  current  system will  be  sent  a break  message.
                 *NO is the default.

                 If  *YES is specified,  a message queue  must be named
                 in the BRKMSGQ parameter.

                 If  the  workstation  is  not  signed  on,   no  error
                 occurs.    The  message  will remain  in  the  message
                 queue.

   REPEAT        The  number of seconds  to delay  before an additional
                 notification is  sent  for the  same condition.    The
                 default  is 1800  seconds  (30  minutes).   Using  the
                 default,  a notification will only  occur at a maximum
                 of once every 30 minutes.   Because of the time  delay
                 in  the   WAKEUP  parameter  and   the  time   to  run
                 CVTWRKACT,  the time delay  will probably  be somewhat
                 longer.

   SKP1STNDF     A  *YES/*NO parameter  for whether  to skip  the first
                 notification.

                 *NO  is the  default  meaning the  first  notification
                 will  occur as soon  as a  wakeup interval  is reached
                 and  a job is  recognized as in  a MSGW  status.  This
                 could be a matter of  seconds depending on the  timing
                 of when  the job enters the  MSGW status and  when the
                 next wakeup point occurs.

                 *YES   may    be   specified   to   skip   the   first
                 notification.     This   may   allow   normal   system
                 operations  to  answer  the  message   and  prevent  a
                 notification.    If  *YES  is  specified,  the  REPEAT
                 parameter   determines  when  the  first  notification
                 will occur.

   JOBTYPE       The job type to convert.   B is the default  and means
                 only  batch jobs.   B  = Batch  includes job  types of
                 BCH,  BCI,  PJ,  and  other  batch  types  as seen  on
                 WRKACTJOB.   The  other supported  values  are  *=ALL,
                 A=Autostart,    I=Interactive,   M=Monitor,    R=Spool
                 reader,   S=System  job,  X=Start   CPF,  and  W=Spool
                 writer.

   JOB           The job name to  be used for the  submitted job.   The
                 default is  CHKJOBMSGW.   Two  jobs of  the same  name
                 may not be active.

                 By  entering a  subsystem name  for the  SBS parameter
                 and   a  unique  job  name   you  may  have  different
                 notifications sent depending on the subsystem.

   EMAILUSR      The name  of the E  mail user  to send a  notification
                 to if  EMAIL(*YES) is specified.  The  name must exist
                 in  the MAILADRP file as  specified for the MAILADRLIB
                 parameter.    See  the  discussion  with  the  MAILADR
                 tool.

   MAILADRLIB    The  name  of  the library  where  the  MAILADRP  file
                 exists.   *LIBL  is the default.   See  the discussion
                 with the MAILADR tool.

   RMTSYS        The remote  system name  to be  used if  FTP(*YES)  is
                 specified.  A valid FTP configuration must exist.

   MSKPWDNBR     The RTVMSKPWD  tool is  used by  FTP(*YES) to  prevent
                 having  a  source   member  with  an  actual  password
                 included.   A single user may  have up to 99 passwords
                 for different  systems.  The  number represents  which
                 masked password  will be used.  See  the RTVMSKPWD for
                 how to enter a masked password.

   BRKMSGQ       The   workstation  message  queue   to  send  a  break
                 message to if MSGQ(*YES) is specified.


ENDJOBMSGW Command parameters                         *CMD
-----------------------------

   JOB           The name of the job  that was submitted by  CHKJOBMSGW
                 that will  be ended.   CHKJOBMSGW is  the default.   A
                 DELAY  time of  150 seconds (2  1/2 minutes)  is used.
                 The  specified  job  will  end  normally  within  this
                 time.


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

Several restrictions are discussed in the previous documentation.

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

The following TAA Tools must be on your system:

     ADDTIM          Add time
     CHKJOBCTL       Check *JOBCTL
     CVTWRKACT       Check WRKACTJOB
     DUPTAADBF       Duplicate TAA data base file
     FTP2            FTP 2
     RSNLSTMSG       Resend last message
     RTVDAT          Retrieve date
     RTVJOBSTS       Retrieve job status
     RTVMAILADR      Retrieve mail address
     RTVMSKPWD       Retrieve masked password
     RTVSBSD         Retrieve subsystem description
     RTVSYSVAL3      Retrieve system value 3
     RTVTIMSTM       Retrieve time stamp
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDTXTMAIL      Send text mail

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

You  must  fulfill  the requirements  for  the  individual  options  as
described earlier.

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

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

   TAAJOEZ       *CMD                   TAAJOEZ       QATTCMD
   TAAJOEZ2      *CMD                   TAAJOEZ2      QATTCMD
   TAAJOEZC      *PGM       CLP         TAAJOEZC      QATTCL
   TAAJOEZC2     *PGM       CLP         TAAJOEZC2     QATTCL
   TAAJOEZC11    *PGM       CLP         TAAJOEZC11    QATTCL
   TAAJOEZC12    *PGM       CLP         TAAJOEZC12    QATTCL
   TAAJOEZR      *PGM       RPG         TAAJOEZR      QATTRPG
   TAAJOEZP      *FILE      PF          TAAJOEZP      QATTDDS

Structure
---------

CHKJOBMSGW  Cmd
   TAAJOEZC   CL pgm Submits TAAJOEZC11
     TAAJOEZC11  CL pgm to use CVTWRKACT
       TAAJOEZC12  CL pgm to read CVTWRKACT and notify
         TAAJOEZR    RPG pgm to store job names and times

ENDJOBMSGW  Cmd
   TAAJOEZC2   CL pgm
					

Added to TAA Productivity tools July 15, 2009


Home Page Up to Top