TAA Tools
CHKJOBCTL       CHECK JOB CONTROL AUTHORITY            TAAJOBY

The Check Job Control  Authority command determines if the  current job
has  the  special  authority   *JOBCTL.    Group  profile  and  program
adoption authority are also considered.

The  command will send  CPF9898 as an  escape message if  the user does
not have *JOBCTL.  A simple version of the command would be:

             CHKJOBCTL
             MONMSG        MSGID(CPF9898) EXEC(DO)
               .
               .

There is an  optional parameter  ERRTXT that allows  you to supply  the
message  text sent  for  the CPF9898  message.   This  is intended  for
situations  where you are  using a Standard Error  handling routine and
just want to bubble the message  back.  For example, assume PGMA  calls
PGMB and  PGMB contains CHKJOBCTL.   If PGMB contains a  standard error
handling routine, the error text would be sent to PGMA.

          CHKJOBCTL      ERRTXT('You must have *JOBCTL +
                          special authority to use the +
                          xxxx function')

If  the command  completes normally, the  error text  is not used.   If
the user  is not  authorized,  the CPF9898  message  is sent  with  the
error text provided.

There is no completion message if the user is authorized.

CHKJOBCTL is  useful when  a user  makes a  request to  use a  function
that  requires *JOBCTL  authority.   You can  check first  before using
the  actual  function so  that  an escape  message  can be  sent before
executing a series of commands.

Note that if the check  occurs in an interactive job before a  job that
requires *JOBCTL  is submitted  to batch, the  command does  not ensure
that the  user will have authority in the  batch job.  Program adopt is
not passed to  the batch job.   You should use  CHKJOBCTL in the  batch
job in addition.

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

   ERRTXT        The error  text to be  used if an  error occurs.   The
                 default  is *STD  which produces standard  error text.

                 The intent of  allowing you  to enter the  text is  if
                 you  are using  the  CHKJOBCTL  command in  a  program
                 that  uses  a   standard  error  handling  routine  to
                 bubble  up the  message text to  the caller.   You can
                 supply some  specific text  relative  to the  function
                 of your program.

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

None.

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

The following TAA Tools must be on your system:

        SNDESCMSG      Send escape message

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

None, the tool is ready to use.

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

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

   CHKJOBCTL     *CMD                   TAAJOBY       QATTCMD
   TAAJOBYC      *PGM       CLP         TAAJOBYC      QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top