Example 3: The LIBRARY keyword

Assume the user has issued these ALLOCATE statements for an application-level panel library before entering ISPF:
ALLOCATE DATASET('ISPFPROJ.ABC.APPAN1',
                 'ISPFPROJ.ABC.APPAN2') FILE(APPLIB) SHR
ALLOCATE DATASET('ISPFPROJ.ABC.MYPAN') FILE(ISPPUSR) SHR
ALLOCATE DATASET('ISPFPROJ.ABC.PANELS') FILE(ISPPLIB) SHR
Next, the LIBDEF service is invoked with the LIBRARY keyword to define an application-level panel libname.
ISPEXEC LIBDEF ISPPLIB LIBRARY ID(APPLIB)

or alternately

CALL ISPLINK('LIBDEF  ', 'ISPPLIB ', 'LIBRARY ', 'APPLIB ');

The search sequence, using the APPLIB definition, for panel APPLPAN1 is as follows:

  1. Search for the member APPLPAN1 in ISPFPROJ.ABC.APPAN1
  2. Search for the member APPLPAN1 in ISPFPROJ.ABC.APPAN2.
The search sequence, using the ISPPLIB definition, for panel APPLPAN1 is as follows: If the LIBDEF service had not been invoked, only ISPFPROJ.ABC.PANELS would have been searched for APPLPAN1. The user library would not be searched.