TAA Tools

The Check  SAVSYS  Authority command  determines if  the  user has  the
special  authority  *SAVSYS.     Group  profile  and  program  adoption
authority are also considered.

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

             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 CHKSAVSYS.   If PGMB contains a  standard error
handling routine, the error text would be sent to PGMA.

          CHKSAVSYS      ERRTXT('You must have *SAVSYS +
                          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.

CHKSAVSYS is  useful when  a user  makes a  request to  use a  function
that will  require saving or restoring  any object on the  system.  You
may  want to check first  before using system resources  for a user who
is not authorized.

Note that if  the check occurs  in an interactive  job before a  job 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 CHKSAVSYS in the batch job in addition.


The system  does not provide  a simple  means of  checking for  *SAVSYS
special authority.   The solution  provided is to  attempt to  save the
CHKSAVDEV  data area in  TAATOOL to  a save file  in TAATOOL.   Since a
normal user  would  not be  authorized  to  save the  object,  the  SAV
command fails  with a  CPF3770 escape  message.   A diagnostic  message
(CPF3760) precedes  the escape message,  but the diagnostic  is sent to
a  lower level program and  is not accessible.   The CPF3770 message is
removed  and  an  escape   message  is  sent  by  the   CHKSAVSYS  CPP.
Therefore, you should  see CPF3760 in the job  log preceding the escape
message from CHKSAVSYS.

The CPF4104 message is also treated like CPF3770.

If  the  SAV command  fails  for some  other reason  that  produces the
CPF3770 escape message,  the CHKSAVSYS command  will fail, but  provide
misleading information.

If  you  suspect a  problem,  check  the  job  log for  the  diagnostic
message that precedes the escape message sent by CHKSAVSYS.

Because  of  the technique  used,  a  user who  does  not  have *SAVSYS
authority, but  who  does have  *ALLOBJ  authority will  not  fail  the

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  CHKSAVSYS  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.


See the considerations section.


The following TAA Tools must be on your system:

        SNDESCMSG      Send escape message


None, the tool is ready to use.

Objects used by the tool

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

   CHKSAVSYS     *CMD                   TAASAVO       QATTCMD
   TAASAVOC      *PGM       CLP         TAASAVOC      QATTCL

Added to TAA Productivity tools May 1, 1996

Home Page Up to Top