TAA Tools

 CHKIBMLIB       CHECK IBM LIBRARY                      TAASAVL

 The Check  IBM Library  command allows  you to determine  if a  library
 will  be  saved by  a  SAVLIB  command.   Different  request types  are
 supported  such as  *NONSYS, *IBM, or  *ALLUSR.  The  command returns a
 value of *IBM or *USER depending on the library name.

 The  command allows  a  CL  program  method of  determining  where  the
 library  appears in  the  chart  provided in  the  Backup and  Recovery
 Guide.   This determines if a  library will be saved  based on the type
 of SAVLIB command requested.

 A typical series of commands would be entered as:

         DCL         &SAVBYCMD *CHAR LEN(4)
          .
         CHKIBMLIB   LIB(xxx) RQSTYPE(*NONSYS) SAVBYCMD(&SAVBYCMD)
         IF          (&SAVBYCMD *EQ '*YES) DO ...

 If the library does  not exist, CPF9898 is  sent as an escape  message.

 The  command provides  a return  variable  for whether  the library  is
 considered  *IBM or *USER.   CHKIBMLIB  follows the definition  used by
 the SAVLIB command.   This includes any library  beginning with Q  plus
 a few specific libraries beginning with # (e.g.  #RPGLIB).

 CHKIBMLIB also  provides a return  variable for  the user that  created
 the  library.   System  libraries  are  not-consistent  on who  creates
 them.    You will  find such  user profile  names as  *IBM, QLPINSTALL,
 QSECOFR, and QSYS.

 The QUSRVxRxNx  libraries used  for  user objects  to be  created on  a
 different release  are tested  by comparing for  QUSRV*.  If  found, it
 is considered a user library.

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

    LIB           The library name to be checked.

    RQSTYPE       The  type  of request  to  be  made.   The  default is
                  *NONSYS meaning you  will receive  a determination  in
                  the  SAVBYCMD  parameter  as to  whether  the  library
                  would be saved by a SAVLIB LIB(*NONSYS) command.

                  A   value  of  *IBM   will  return   in  the  SAVBYCMD
                  parameter if the  library will  be saved  by a  SAVLIB
                  LIB(*IBM) command.

                  A  value  of  *ALLUSR  will  return  in  the  SAVBYCMD
                  parameter  if the library  will be  saved by  a SAVLIB
                  LIB(*ALLUSR) command.

                  A  value  of  *SAVLIB  will  return  in  the  SAVBYCMD
                  parameter if  the library  can  be saved  by a  SAVLIB
                  LIB(xxx) command.

    RTNTYPE       A  return  variable  that   must  be  coded  as  *CHAR
                  LEN(5).     It  will  contain  either  *IBM  or  *USER
                  according to the  name of the  library (Any Q  library
                  and specific # libraries are considered *IBM).

    SAVBYCMD      A  return  variable  that   must  be  coded  as  *CHAR
                  LEN(4).   It  will  contain a  value of  *YES  or *NO.
                  See the RQSTYPE parameter.

    CRTUSER       A  return  variable  that  must  be  coded  as   *CHAR
                  LEN(10).  It  will contain the  name of the  user that
                  created the  library.  System libraries do  not have a
                  consistent  user profile  name that is  used to create
                  the libraries.

    TEST          Whether to  test for  libraries that do  not exist  on
                  the  current  system.   The  default  is  *NO.   If  a
                  library  is  specified  that  does  not  exist on  the
                  current system, an escape message is sent.

                  *YES may be  specified to  allow testing of  libraries
                  that do  not exist on the  current system.   The words
                  'Non   exist'  will  exist  for   the  CRTUSER  return
                  parameter.

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

   **   Because the command returns one  or more variables, it can  only
        be entered in a CL program.

   **   You  must  be  authorized for  *USE  authority  to  the  library
        specified to use CHKIBMLIB.

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

    CHKIBMLIB     *CMD                   TAASAVL       QATTCMD
    TAASAVLC      *PGM       CLP         TAASAVLC      QATTCL

Added to TAA Productivity Tools April 1, 1995


Home Page

Last modified on November 19, 2014 © 1995, 2014 - TAA Tools, Inc.