LIBDEF—allocate application libraries

The LIBDEF service provides for the dynamic definition of application data sets, thus allowing application data sets to be specified during an ISPF session. This eliminates the need for allocate statements to define all application data sets before invoking an ISPF session.

The LIBDEF service can be used to define these application-level libraries:

  • Panels
  • Messages
  • Tables
  • Skeletons
  • File tailoring output
  • User link libraries
  • Images

The same ddnames used to define ISPF libraries are used to define data sets on the LIBDEF service requests. An application-level definition for ISPPROF, the ISPF profile library, is not permitted, because ISPPROF contains user-related data.

An application invoked from ISPF issues LIBDEF requests to define the application-level libraries that will be in effect while the application is running. This feature might improve the search time for libraries that are defined at the application level, but it adds an extra search level for entities that exist in the ISPF product library definitions.

The LIBDEF service also allows users to define a generic library type. The generic library extends the use of the LIBRARY parameter on DM component services such as TBCLOSE, TBOPEN, or TBSAVE, by allowing the user to specify the name of a LIBDEF generic library.

Note: The QLIBDEF service allows an ISPF dialog to obtain the current LIBDEF definition information. This information can be saved by the dialog and used later to restore any LIBDEF definitions that may have been overlaid. For each LIBDEF lib-type, the ID parameter and the type of ID is returned. For more information, see QLIBDEF—query LIBDEF definition information.

The currently allocated ISPF libraries must still be defined before invoking ISPF and cannot be changed while in an ISPF session. Within a given application, when a LIBDEF has been defined with either the DATASET (or EXCLDATA) or LIBRARY (or EXCLLIBR) keyword, and another LIBDEF request is issued with either keyword for the same lib-type, the second definition takes precedence over the first. If the user specifies the COND keyword on the service call, the application-level library is defined only if there is no application-level library already defined for the specified type (for example, messages or panels).

The absence of the DATASET (or EXCLDATA) or LIBRARY (or EXCLLIBR) keyword, or the presence of either keyword with a null data set list, indicates that an application-level definition for the specified type is removed, if one exists.

When the DATASET keyword is specified with the LIBDEF service, it causes the newly defined application-level library to be searched before the allocated ISPF library for a particular type. To allow the user to continue to define user-level libraries that are to be searched first, these new ddnames must be specified in ALLOCATE commands before ISPF is invoked:

ISPMUSR
User message library
ISPPUSR
User panel library
ISPSUSR
User skeleton library
ISPTUSR
User table library
ISPTABU
User table output library
ISPFILU
User file tailoring output library
ISPLUSR
User link library
ISPIUSR
User image library.

The LIBDEF service only affects the ISPF DDs. To alter the SYSPROC concatenation sequence, use the TSO/E ALTLIB command.

Note: When the user ddname for the library type is defined, data set names allocated to it are treated as being concatenated ahead of those specified on the LIBDEF service request. The rules governing concatenation of data sets apply.

Only the first 15 data sets allocated to these user ddnames will be searched by ISPF before the LIBDEF application-level library.

In the case of ISPLLIB, EXCLDATA can be used instead of DATASET, and EXCLLIBR instead of LIBRARY exclusively. Using one of these keywords (EXCLDATA or EXCLLIBR) indicates that when searching for the LOAD module, ISPF is only considering the application-level libraries defined by the LIBDEF service. That is, user libraries and ISPF base libraries are not used when EXCLDATA or EXCLLIBR is specified.

The DATASET (or EXCLDATA) and LIBRARY (or EXCLLIBR) keywords are mutually exclusive.