Example 4: The EXCLLIBR keyword

Assume the user has issued these ALLOCATE statements for an application-level link library before entering ISPF:
ALLOCATE DATASET('ISPFPROJ.ABC.APMOD1',
                 'ISPFPROJ.ABC.APMOD2') FILE(APLLIB) SHR
ALLOCATE DATASET('ISPFPROJ.ABC.MYMOD') FILE(ISPLUSR) SHR
ALLOCATE DATASET('ISPFPROJ.ABC.LLOAD') FILE(ISPLLIB) SHR
Next, the LIBDEF service is invoked with the EXCLLIBR keyword to define an application-level user link library.
ISPEXEC LIBDEF ISPLLIB EXCLLIBR ID(APLLIB)

or alternately

CALL ISPLINK('LIBDEF ', 'ISPLLIB ', 'EXCLLIBR', 'APLLIB ');

The search sequence for program APPLMOD1, using the APLLIB definition, is as follows:

  1. Search for the member APPLMOD1 in ISPFPROJ.ABC.APMOD1
  2. Search for the member APPLMOD1 in ISPFPROJ.ABC.APMOD2.

If the LIBDEF service had not been invoked, only ISPFPROJ.ABC.LLOAD would have been searched for APPLMOD1. The user library would not be searched.