TAA Tools
CHKCMDDFT       CHECK COMMAND DEFAULT                  TAACMEG

The  Check Command  Default  command checks  commands  in one  or  more
libraries  to determine if  the system  supplied CHGCMDDFT  command was
used.  If a command cannot be checked, it is flagged.

The   user  of  the  command  must   be  authorized  to  the  TAADSPADP
authorization list.

A typical command would be:

            CHKCMDDFT    LIB(*ALL) OMITLIB(QSYSV*)

All libraries  would  be processed  with the  exception  of the  QSYSV*
libraries  (used for  command  definitions of  previous  versions).   A
DSPOBJD  outfile would be created for all  commands in the libraries to
be processed.

The ODAPAR  field  would be  examined and  if  it contains  CHGDFT,  an
exception line would  be printed on the  spooled output.  If  the field
value is not blank and is not CHGDFT, the command is flagged.

Any  proxy commands  are noted  along  with the  library of  the actual
command.

The TAATOOL  library  has  two exceptions  where  command  objects  are
duplicated from QSYS and then changed by CHGCMDDFT.

        SBMJOB2
        SBMJOB3

Detection technique
-------------------

When  CHGCMDDFT is  run, the  ODAPAR  field is  updated  in the  object
description  with the value  'CHGDFT'.  This  can be seen  with DSPOBJD
using the Service option for the information labeled 'APAR ID'.

If  a mistake  was made and  the default was  put back  to its original
value, the object description still indicates 'CHGDFT'.

CHKCMDDFT only checks  the ODAPAR field  to determine if CHGCMDDFT  was
used.

For system  supplied commands,  the use of  CHGCMDDFT also  changes the
field ODUMOD  to '1' indicating a user change  has been made.  For user
commands, ODUMOD is always set to  '1' when a command is created.   The
value for  ODUMOD can  be seen  with the  Service information with  the
information labeled 'User modified'.

For  system supplied  commands, it does  not appear  that there  is any
method for the user to change the  ODAPAR value.  If a PTF was  applied
that affected  the command,  the CHGDFT  information would probably  be
lost.

For  user commands,  the ODAPAR value  can be  changed by  the QLICOBJD
API  to any  value desired.   The  TAA command CHGOBJD2  simplifies the
changing of this field.

The reason a system  supplied command cannot be  changed by the API  is
that the API  supports an option that will  prevent any further changes
using  the API.   After a command  (or any object) is  created, you can
run the API to state  that the API cannot  be used again.  This  option
is also supported by the TAA CHGOBJD2 command.

The  option  that  'Allows  a QLICOBJD  change'  cannot  be  seen  with
DSPOBJD, but the outfile field ODAAPI describes the setting.

If  you use CRTDUPOBJ  to create a  duplicate of a  command, it retains
the setting of the ODAAPI value.

CHKCMDDFT escape messages you can monitor for
---------------------------------------------

      TAA9891    No libraries were found to check.
      TAA9892    No command objects were found to check

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

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

   LIB           The library  to be  processed.   A list  of up  to  50
                 library names,  generic names,  or the special  values
                 *LIBL, *USRLIBL,  *CURLIB, *ALLUSR, *IBM,  or *ALL may
                 be entered.  The default is *ALL.

                 For  *LIBL and *USRLIBL, if  a current library exists,
                 it will be processed  before the records for  the user
                 portion of  the library list.  If  the current library
                 is  also  part  of the  user  portion  of  the library
                 list, it will  only appear  once (it  is removed  from
                 the user portion  list).  Product libraries  are never
                 included.

                 If  you  are  checking  *ALL  libraries,  and are  not
                 using the  previous definition  of commands  found  in
                 the QSYSVnRnMn  libraries, omitting QSYSV*  will avoid
                 checking many commands.

                 An entry  of *IBM causes  any library defined  to be a
                 system  library according to the  CHKIBMLIB tool to be
                 included.

   LIBTYPE       Whether to  select all  or a  specified library  type.
                 *ALL is the default to select all types.

                 *PROD  may be  used to  select only  production (PROD)
                 libraries.

                 *TEST   may  be  used  to   select  only  test  (TEST)
                 libraries.

   OMITLIB       A list  of  up  to  50 libraries  or  generic  library
                 names that should  be omitted.  *NONE  is the default.

                 An omit list may not be entered for LIB(*CURLIB).

                 Any library entered is checked for existence.

                 No check  occurs to see if an  omit library would have
                 been  selected.    For   example,  if  LIB(*LIBL)   is
                 entered with  OMITLIB(ABC) and library  ABC is  not on
                 the library list, no error occurs.

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

  **   See the discussion on why the check cannot be 100% accurate.

  **   The  user of  the command  must be  authorized to  the TAADSPADP
       authorization list.

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

The following TAA Tools must be on your system:

     CHKDUPLST       Check duplicate list
     DSPADP          Display adopt
     EDTVAR          Edit variable
     EXTLST          Extract list
     EXTLST2         Extract list 2
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

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

None, the tool is ready to use.

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

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

   CHKCMDDFT     *CMD                   TAACMEG       QATTCMD
   TAACMEGC      *PGM       CLP         TAACMEGC      QATTCL
   TAACMEGC2     *PGM       CLP         TAACMEGC2     QATTCL
   TAACMEGR      *PGM       RPG         TAACMEGR      QATTRPG
					

Added to TAA Productivity tools May 1, 2000


Home Page Up to Top