Example 2: The EXCLDATA keyword

Assume that the user has issued these ALLOCATE statements for a user link library before entering ISPF:
ALLOCATE DATASET('ISPFPROJ.ABC.MYMOD') FILE(ISPLUSR) SHR
ALLOCATE DATASET('ISPFPROJ.ABC.LLOAD') FILE(ISPLLIB) SHR
Next, the LIBDEF service is invoked with the EXCLDATA keyword to define an application-level link library (a partitioned data set).
ISPEXEC LIBDEF ISPLLIB EXCLDATA ID('ISPFPROJ.ABC.APMOD1',
                                  'ISPFPROJ.ABC.APMOD2')
or alternately
CALL ISPLINK('LIBDEF  ', 'ISPLLIB ', 'EXCLDATA',
       '('ISPFPROJ.ABC.APMOD1','ISPFPROJ.ABC.APMOD2'')');

This example assumes that MYMOD contains programs or commands unique to the user. Programs unique to the application are contained in partitioned data sets ISPFPROJ.ABC.APMOD1 and ISPFPROJ.ABC.APMOD2.

The search sequence for program APPLMOD1 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 member APPLMOD1. The user library would not be searched.