|
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.
Application data element search order
When two or more input libraries are to be searched for an item,
the search begins with the first library in a list and continues through
the list until the item is found. For example, if the item searched
for is of type "Panels" and a "LIBDEF with DATASET" service
call is in effect, the input libraries (ISPPUSR, the LIBDEF defined
library, and ISPPLIB) are searched consecutively in the order shown.
The search stops when the item is found or when the last library has
been searched.
The search of two or more output libraries proceeds in the same
way, except that the first definition found is used as the repository
for the output.
If no application-level libraries have been defined, the current
set of allocated ISPF libraries is searched. If an application-level
library is defined, it is searched before the allocated ISPF libraries.
Table 1 defines the search sequence for
all item types.
Table 1. Search
Sequence for Libraries |
No LIBDEF |
LIBDEF with DATASET |
LIBDEF with LIBRARY |
LIBDEF with EXCLDATA |
LIBDEF with EXCLLIBR |
---|
Panels |
ISPPLIB |
ISPPUSR
LIBDEF
ISPPLIB
|
LIBDEF
ISPPLIB
|
Not valid |
Not valid |
Messages |
ISPMLIB |
ISPMUSR
LIBDEF
ISPMLIB
|
LIBDEF
ISPMLIB
|
Not valid |
Not valid |
Table Input |
ISPTLIB |
ISPTUSR
LIBDEF
ISPTLIB
|
LIBDEF
ISPTLIB
|
Not valid |
Not valid |
Skeleton |
ISPSLIB |
ISPSUSR
LIBDEF
ISPSLIB
|
LIBDEF
ISPSLIB
|
Not valid |
Not valid |
Images |
ISPILIB |
ISPIUSR
LIBDEF
ISPILIB
|
LIBDEF
ISPILIB
|
Not valid |
Not valid |
Linklib (See note following this table) |
Job Pack Area
ISPLLIB
STEPLIB
Link Pack Area
LINKLIB
|
Job Pack Area
ISPLUSR
LIBDEF
ISPLLIB
STEPLIB
Link Pack Area
LINKLIB
|
Job Pack Area
LIBDEF
ISPLLIB
STEPLIB
Link Pack Area
LINKLIB
|
Job Pack Area
LIBDEF
Link Pack Area
LINKLIB
|
Job Pack Area
LIBDEF
Link Pack Area
LINKLIB
|
Table Output |
ISPTABL |
ISPTABU
LIBDEF
|
LIBDEF |
Not valid |
Not valid |
File Tailoring Output |
ISPFILE |
ISPFILU
LIBDEF
|
LIBDEF |
Not valid |
Not valid |
Table Services (Input) with LIBRARY Parameter |
Allocated Library |
(Unchanged) |
LIBDEF |
Not valid |
Not valid |
Table Services (Output) with LIBRARY Parameter |
Allocated Library |
LIBDEF |
(Unchanged) |
Not valid |
Not valid |
File Tailoring Services (Output) with LIBRARY
Parameter |
Allocated Library |
LIBDEF |
(Unchanged) |
Not valid |
Not valid |
Note: - If a program in Linklib is to be attached as a command processor
(that is, by using the SELECT CMD parameter) and the command is not
defined in the TSO command characteristics table (ISPTCM), the search
sequence illustrated here does not apply. See z/OS ISPF Planning and Customizing for
information about customizing ISPTCM for the correct search order.
- When using a SELECT with NEWAPPL, you must include PASSLIB to
use the LIBDEFs you defined. For more details, see the description
of the NEWAPPL parameter under SELECT—select a panel or function.
- The image library with the associated ddname ISPILIB is not a
required ISPF library. If you plan to use ISPF's image support in
GUI mode, you must allocate the image input data set to ddname ISPILIB
before using the images or before invoking the LIBDEF service with
libtype ISPILIB.
Command invocation format
>>-ISPEXEC--LIBDEF--lib-type--+----------+---------------------->
+-DATASET--+
+-EXCLDATA-+
+-LIBRARY--+
'-EXCLLIBR-'
>--ID(-+--------------+-)--+--------+--------------------------><
+-dataset-list-+ +-COND---+
'-libname------' +-UNCOND-+
+-STACK--+
'-STKADD-'
Note: The default option is set in the ISPF configuration table keyword
DEFAULT_LIBDEF_PROCESSING_OPTION. By default this keyword is set to
UNCOND.
Call invocation format
>>-CALL--ISPLINK--('LIBDEFbb'--,--lib-type---------------------->
>--,-+-'b'----------------------------+--,-+-'b'--------+-);---><
+-'DATASETb'---------------------+ +-'CONDbbbb'-+
+-'EXCLDATA'---------------------+ +-'UNCONDbb'-+
+-'LIBRARYb'---------------------+ +-'STACKbbb'-+
'-'EXCLLIBR'--,-+-'b'----------+-' '-'STKADDbb'-'
+-dataset-list-+
'-libname------'
Note: The default option is set in the ISPF configuration table keyword
DEFAULT_LIBDEF_PROCESSING_OPTION. By default this keyword is set to
UNCOND.
Parameters
- lib-type
- Indicates which type of ISPF ddname application-level library
definition is being made. The value specified for lib-type must be
padded with blanks, if needed, to make the total length 8 characters.
For generic libraries it is the ddname as specified by the LIBRARY
parameter of the corresponding table or file tailoring service.
Users
can specify these types of libraries:
- ISPMLIB
- Message library
- ISPPLIB
- Panel library
- ISPSLIB
- Skeleton library
- ISPTLIB
- Table input library
- ISPTABL
- Table output library
- ISPFILE
- File tailoring output file
- ISPLLIB
- Load module library
- xxxxxxxx
- Generic library
- ISPILIB
- Image library
ISPF ddname libraries
can only be used for their intended purpose. Generic libraries can
be used for table input, table output, or file tailoring output.
- DATASET
- The DATASET keyword indicates that ID specifies a list of cataloged
data sets that contain the application's dialog elements. For table
and file tailoring output libraries, only one data set can be specified.
For other libraries, a maximum of 15 names can be supplied in the
data set list. All the data sets defined by LIBDEF must be cataloged.
If application PAYROLL uses panels PAYINIT and PAYTERM (members
of the library 'ISPFPROJ.ABC.PANELS'), the LIBDEF service request
to identify the panels to ISPF can be:
ISPEXEC LIBDEF ISPPLIB DATASET ID('ISPFPROJ.ABC.PANELS')
The
DISPLAY service would then be issued as:
ISPEXEC DISPLAY PANEL(PAYINIT)
Allocate
statements need not be specified before ISPF is invoked for the data
sets defined by the LIBDEF service with the DATASET keyword.
- EXCLDATA
- The EXCLDATA keyword indicates that ID specifies a list of cataloged
user link library data sets. EXCLDATA can only be used with ISPLLIB.
For example, if application PAYROLL uses two programs, PAYINIT
and PAYTERM, which are members of the partitioned data set ISPFPROJ.ABC.PROGRAMS,
the LIBDEF service request for identifying the programs to ISPF can
be issued as:
ISPEXEC LIBDEF ISPLLIB EXCLDATA ID('ISPFPROJ.ABC.PROGRAMS')
See User link libraries for a discussion on the effect of
the EXCLDATA specification on member searches.
Allocate statements
need not be specified before ISPF is invoked for the data set defined
by the LIBDEF service with the EXCLDATA keyword.
- LIBRARY
- The LIBRARY keyword associates an allocated ddname with an ISPF
data element type. The ID parameter specifies the ddname. See libname.
For example, if application PAYROLL uses panels PAYINIT and PAYTERM,
a LIBDEF service request used to identify the panels to ISPF is: ISPEXEC LIBDEF ISPPLIB LIBRARY ID(PAYDD)
Before
issuing this LIBDEF service request, you must issue: ALLOCATE FI(PAYDD) DA('ISPFPROJ.ABC.PANELS') SHR
The
DISPLAY service would then be issued as: ISPEXEC DISPLAY PANEL (PAYINIT)
- EXCLLIBR
- The EXCLLIBR keyword associates an allocated user link library
ddname with the ISPF link library dialog element type. The ID parameter
specifies the ddname. See libname. (Can only be used with ISPLLIB.)
For example, if application PAYROLL uses programs PAYINIT and
PAYTERM, a LIBDEF service request for identifying the programs to
ISPF is: ISPEXEC LIBDEF ISPLLIB EXCLLIBR ID(PAYDD)
Prior
to issuing this LIBDEF service request, you must issue: ALLOCATE FI(PAYDD) DA('ISPFPROJ.ABC.PROGRAMS') SHR
See User link libraries for a discussion on the effect of
the EXCLLIBR specification on member searches.
- dataset-list
- Indicates a list of cataloged data set names to be searched for
the application. A maximum of 15 data set names cam be listed. (See data-set-list for the specification
of data set lists.)
- libname
- Specifies the name of a previously allocated DD statement that
defines the application-level library or libraries.
- COND
- Specifies that the application-level library should be defined
only if there is no active application-level library for the specified
type.
- UNCOND
- Specifies that the application-level library should be defined
regardless of the existence of an application-level library for the
specified type.
- STACK
- Specifies the current state of the lib-type LIBDEF definition
is to be stacked before acting on the new request. Stacking occurs
even when there is no active LIBDEF definition for the specified lib-type.
A null definition is stacked when there is no active LIBDEF definition.
This allows an application to issue a LIBDEF stack request for a particular
lib-type without knowing if an active LIBDEF definition currently
exists.
For example, it is valid to specify a LIBDEF definition
for ISPPLIB and request that the current ISPPLIB LIBDEF definition
be stacked, even when no current ISPPLIB LIBDEF definition exists.
When the ISPPLIB LIBDEF definition that requested stacking is removed,
there will be no active ISPPLIB LIBDEF definition in effect.
It
is also valid to request stacking when resetting a particular LIBDEF
definition. For example, it is valid to specify a reset of the ISPPLIB
LIBDEF definition and request that the current ISPPLIB definition
be stacked, even when no current ISPPLIB LIBDEF definition exists.
A subsequent reset request of the ISPPLIB LIBDEF definition will restore
the previously stacked ISPPLIB LIBDEF definition, including a restoration
of a null definition.
Note: You can use STACK or STKADD on a
LIBDEF statement. If both STACK and STKADD parameters are used on
a single LIBDEF statement, ISPF uses only the last one specified.
- STKADD
- Specifies the new LIBDEF request with the STKADD and DATASET parameters
is to be added to the existing lib-type LIBDEF definition. STKADD
concatenates the new LIBDEF request to the existing LIBDEFed lib-type
definition. No stacking is done.
Note: - You can use STACK or STKADD on a LIBDEF statement. If both STACK
and STKADD parameters are used on a single LIBDEF statement, ISPF
uses only the last one specified.
- The STKADD parameter is restricted to use with the DATASET parameter.
It is not for use with the EXCLDATA, LIBRARY, or EXCLLIBR parameters.
ISPF issues a severe error message if STKADD is used with those parameters.
- buf-len
- Specifies a fullword fixed binary integer containing the length
of "buffer".
- buffer
- Specifies a buffer containing the name of the service and its
parameters in the same form as they would appear in an ISPEXEC invocation
for a command procedure.
Usage notes
LIBDEF Display utility
The LIBDEF Display Utility displays all active and stacked LIBDEF
definitions for the current logical screen in a scrollable list. Optionally,
a specific LIBDEF library definition may be selected.
The ISPF system command, ISPLIBD [libtype] invokes the LIBDEF Display
Utility. The optional parameter, libtype, identifies a specific LIBDEF
library definition to be displayed. All LIBDEF definitions for the
current logical screen are displayed if the parameter is omitted,
if the parameter is longer than 8 characters, or if the parameter
specifies ISPPROF as the library name.
For each LIBDEF definition displayed, this information is provided:
For type DATASET/EXCLDATA this column contains the data set names.
The associated ISPxUSR data set names is shown when the respective
DDNAME is allocated. The ISPxUSR data sets are not shown as part of
a stacked definition.
For type LIBRARY/EXCLLIBR this column contains the library name
(ddname) followed by the first or only allocated data set name.
The LIBDEF Display Utility supports the use of a LOCATE command.
LOCATE is used to locate a specific LIBDEF library name. Two command
abbreviations, LOC and L, are also supported.
- LOCATE ISPPLIB
- Locates the LIBDEF definition for ISPPLIB
- LOC ISPMLIB
- Locates the LIBDEF definition for ISPMLIB
- L ISPSLIB
- Locates the LIBDEF definition for ISPSLIB
This figure shows a LIBDEF Utility display of all LIBDEF definitions. Figure 2 shows a display of a single LIBDEF
definition, and Figure 3 shows a LIBDEF
stacked definition.
Figure 1. ISPLIBD - all LIBDEF definitions┌------------------------- LIBDEF Utility ----------------------------┐
│ ISPLLSA ISPF LIBDEF Display Row 1 to 13 of 16│
│ │
│ │
│ Library Type USR Identifier │
│ │
│ ISPFILE ** LIBDEF not active ** │
│ ISPLLIB EXCLDATA ISPFPROJ.LWGMVS41.LOAD │
│ ISPFPROJ.DMTSO.LOAD │
│ ISPMLIB DATASET ISPFPROJ.LWGMVS32.MSGS │
│ ISPFPROJ.LWGMVS31.MSGS │
│ ISPPLIB DATASET X ISPFPROJ.LWG.PANELS │
│ ISPFPROJ.LWGMVS32.PANELS │
│ ISPFPROJ.LWGMVS31.PANELS │
│ ISPSLIB DATASET ISPFPROJ.RGG.SKELS │
│ ISPTABL LIBRARY MYTABLE │
│ ISPFPROJ.LWGMVS33.TABLES │
│ ISPTLIB ** LIBDEF not active ** │
│ MYGEN1 LIBRARY MYTABLE │
│ │
│ Command ===> _____________________________________ Scroll ===> CSR │
│ F1=Help F2=Split F3=Exit F7=Backward F8=Forward │
│ F9=Swap F12=Cancel │
└---------------------------------------------------------------------┘
Figure 2. ISPLIBD ISPPLIB - ISPPLIB
LIBDEF definition┌------------------------- LIBDEF Utility ----------------------------┐
│ ISPLLSA ISPF LIBDEF Display Row 1 to 3 of 3│
│ │
│ │
│ Library Type USR Identifier │
│ │
│ ISPPLIB DATASET X ISPFPROJ.LWG.PANELS │
│ ISPFPROJ.LWGMVS32.PANELS │
│ ISPFPROJ.LWGMVS31.PANELS │
│ **End** │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ Command ===> _____________________________________ Scroll ===> CSR │
│ F1=Help F2=Split F3=Exit F7=Backward F8=Forward │
│ F9=Swap F12=Cancel │
└---------------------------------------------------------------------┘
Figure 3. ISPLIBD ISPPLIB - ISPPLIB
LIBDEF stacked definition┌------------------------- LIBDEF Utility ----------------------------┐
│ ISPLLSA ISPF LIBDEF Display Row 1 to 4 of 4│
│ │
│ │
│ Library Type USR Identifier │
│ │
│ ISPPLIB DATASET X ISPFPROJ.LWG.PANELS │
│ ISPFPROJ.LWGMVS41.PANELS │
│ S ISPPLIB DATASET ISPFPROJ.LWGMVS32.PANELS │
│ ISPFPROJ.LWGMVS31.PANELS │
│ **End** │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ Command ===> _____________________________________ Scroll ===> CSR │
│ F1=Help F2=Split F3=Exit F7=Backward F8=Forward │
│ F9=Swap F12=Cancel │
└---------------------------------------------------------------------┘
When you are in the Dialog Test utility (test environment), and
you issue a LIBDEF for a panel data set from option 7.6, the LIBDEF
is set up under the user environment. In order to display a panel
from the library for which you issued the LIBDEF or to display the
active LIBDEFs, you must go through a Dialog Test utility interface.
For example, from Dialog Test's option 7.6 issue: LIBDEF ISPPLIB DATASET ID('xxxx.panels')
To
display the active LIBDEFs, go to 7.1 (the Invoke Dialog Function/Selection
Panel) and type ISPLLS at the PGM prompt and ISPPLIB at
the PARM prompt; then press Enter.
Note: If you attempt to issue the ISPLIBD ISPPLIB command from the
command line on the Dialog Test utility's option 7.6, the LIBDEF utility
will indicate that ISPPLIB has no active LIBDEFs. This is because
the Dialog Test utility runs in the test environment, not the user
environment.
User link libraries
The LIBDEF ISPLLIB service can be used to specify load libraries
containing programs and command processors, which are part of an ISPF
application. The LIBDEF ISPLLIB definition causes load modules to
be searched in the specified load libraries by the SELECT service.
The LIBDEF library definitions are not searched by MVS™ member searches caused by the execution of
ATTACH, LINK, LOAD, or XCTL macros within the selected program (SELECT
PGM), or on the selection of authorized programs or commands. The
LIBDEF library definitions are searched for selected commands (SELECT
CMD).
These rules apply: - If the SELECT program service is invoked using ISPEXEC SELECT
PGM(MYPROG), MYPROG is considered a member of the load libraries specified
with LIBDEF ISPLLIB. If MYPROG then transfers control by using MVS contents supervision macros such
as ATTACH, LINK, LOAD, or XCTL, any new requested program that exists
only in the LIBDEF data set is not found, and an 806-04 abend occurs.
This is because ISPF links to MYPROG, and MVS is
not aware of the load library defined using LIBDEF ISPLLIB.
- If the SELECT program service is invoked using ISPEXEC SELECT
CMD(MYCMD), MYCMD is considered a member of the load libraries specified
with LIBDEF ISPLLIB. The command processor (a program coded to support
a unique argument list format) can then use MVS contents supervision macros such as ATTACH,
LINK, LOAD, or XCTL. This is because ISPF attaches MYCMD as a subtask
to ISPF. The load library, defined using LIBDEF ISPLLIB, is passed
as a task library to the subtask.
If LIBDEF is issued while in split screen, it will only affect
the screen on which it is issued, because each screen is a separate
ISPF session with its own TCB and tasklib.
Message libraries
Definition of a message library with LIBDEF will cause a search of
that data set for the required message member before a search of the
base message library. If the member in the LIBDEF-defined message
library has the same name as a member in the base library, all
messages within the base message data set member must be included
in the LIBDEF-defined message data set member. If the message member
found in the LIBDEF-defined message library does not contain the
message being searched for, another search will not be made for the
message in the base message library.
For example, if message ABCD009 is in the base library member
ABCD00, but not in the LIBDEF-defined message library member ABCD00,
message ABCD009 will not be found while the LIBDEF is active.
Return codes
These return codes are possible:
- 0
- Normal completion.
- 4
- When removing the application library: Application library does
not exist for this type.
When STKADD is specified: There is no
existing stack.
- 8
- When COND is used: Application library already exists for this
type.
- 12
- ISPPROF was specified as the lib-type; invalid lib-type specified
with EXCLDATA or EXCLLIBR.
- 16
- A libname was not allocated, or the dataset-list contains an invalid MVS dsname.
- 20
- Severe error.
Note: A return code of 0 can be received for a generic lib-type, even
though the library does not exist. No allocation verification is done
until the generic lib-type is referenced using the LIBRARY parameter
on a file tailoring or table service request.
Examples
Example 1: The DATASET keyword
Assume that the user has issued these ALLOCATE statements for a
panel library before entering ISPF: ALLOCATE DATASET('ISPFPROJ.ABC.MYPAN') FILE(ISPPUSR) SHR
ALLOCATE DATASET('ISPFPROJ.ABC.PANELS') FILE(ISPPLIB) SHR
Next, the LIBDEF service is invoked with the DATASET keyword to
define an application-level panel library (a partitioned data set).
ISPEXEC LIBDEF ISPPLIB DATASET ID('ISPFPROJ.ABC.APPAN1',
'ISPFPROJ.ABC.APPAN2')
or alternately
CALL ISPLINK('LIBDEF ', 'ISPPLIB ', 'DATASET ',
'('ISPFPROJ.ABC.APPAN1','ISPFPROJ.ABC.APPAN2'')');
This
example assumes that ISPFPROJ.ABC.MYPAN contains panels unique to
the user. Panels unique to the application are contained in partitioned
data sets ISPFPROJ.ABC.APPAN1 and ISPFPROJ.ABC.APPAN2.
The search sequence for panel APPLPAN1 is as follows:
- Search for the member APPLPAN1 in ISPFPROJ.ABC.MYPAN
- Search for the member APPLPAN1 in ISPFPROJ.ABC.APPAN1
- Search for the member APPLPAN1 in ISPFPROJ.ABC.APPAN2
- Search for the member APPLPAN1 in ISPFPROJ.ABC.PANELS
If the LIBDEF service had not been invoked, only ISPFPROJ.ABC.PANELS
would have been searched for member APPLPAN1. The user library would
not be searched.
To clear the LIBDEF after setting it, use either 'ISPEXEC LIBDEF ISPPLIB'
or
'ISPEXEC LIBDEF ISPPLIB DATASET()'
or additionally CALL ISPLINK('LIBDEF ', 'ISPPLIB ', ' ',' ');
or
CALL ISPLINK('LIBDEF ', 'ISPPLIB ', 'DATASET ','()');
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:
- Search for the member APPLMOD1 in ISPFPROJ.ABC.APMOD1
- 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.
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:
- Search for the member APPLPAN1 in ISPFPROJ.ABC.APPAN1
- Search for the member APPLPAN1 in ISPFPROJ.ABC.APPAN2.
The search sequence, using the ISPPLIB definition, for panel APPLPAN1
is as follows: - Search for the member APPLPAN1 in ISPFPROJ.ABC.PANELS.
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.
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:
- Search for the member APPLMOD1 in ISPFPROJ.ABC.APMOD1
- 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.
Example 5: The STACK keyword
Assume these LIBDEF commands are executed:
ISPEXEC LIBDEF ISPPLIB
ISPEXEC LIBDEF ISPPLIB STACK
ISPEXEC LIBDEF ISPPLIB DATASET ID('ISPFPROJ.LWG.PANELS') STACK
ISPEXEC LIBDEF ISPPLIB DATASET ID('ISPFPROJ.LWGMVS33.PANELS') STACK
The execution of these commands produces these results:
- The first LIBDEF resets the ISPPLIB LIBDEF definition. This is
considered a "null" definition for ISPPLIB.
- The second LIBDEF stacks the previous "null" definition for ISPPLIB
and resets the ISPPLIB LIBDEF definition. This is the second "null"
definition for ISPPLIB.
- The third LIBDEF stacks the previous "null" definition for ISPPLIB
and establishes the ISPPLIB definition for data set 'ISPFPROJ.LWG.PANELS'.
- The fourth LIBDEF stacks the previous ISPPLIB definition for data
set 'ISPFPROJ.LWG.PANELS' and establishes the ISPPLIB definition for
data set 'ISPFPROJ.LWGMVS33.PANELS'.
Next, these LIBDEF service calls are issued: ISPEXEC LIBDEF ISPPLIB (restores 'ISPFPROJ.LWG.PANELS')
Return code = 0
ISPEXEC LIBDEF ISPPLIB (restores stacked "null" definition)
Return code = 0
ISPEXEC LIBDEF ISPPLIB (restores stacked "null" definition)
Return code = 0
ISPEXEC LIBDEF ISPPLIB
Return code = 4
The preceding service calls produce these results:
- The first LIBDEF reset restores the ISPPLIB definition for data
set 'ISPFPROJ.LWG.PANELS'.
- The second LIBDEF reset restores the stacked "null" definition
for ISPPLIB. This is the "null" definition which issued the keyword,
STACK.
- The third LIBDEF restores the stacked "null" definition. This
is the "null" definition which did not issue the keyword, STACK.
- The fourth LIBDEF receives a return code of 4 because there is
nothing in the stack and there is no active ISPPLIB definition.
Example 6: The STKADD keyword
Assume these LIBDEF commands are executed: ISPEXEC LIBDEF ISPPLIB
ISPEXEC LIBDEF ISPPLIB STACK
ISPEXEC LIBDEF ISPPLIB DATASET ID('ISPFPROJ.LWG.PANELS') STACK
ISPEXEC LIBDEF ISPPLIB DATASET ID('ISPFPROJ.ABC.PANELS') STKADD
The execution of these commands produces these results:
- The first LIBDEF resets the ISPPLIB LIBDEF definition. This is
considered a "null" definition for ISPPLIB.
- The second LIBDEF stacks the previous "null" definition for ISPPLIB
and resets the ISPPLIB LIBDEF definition. This is the second "null"
definition for ISPPLIB.
- The third LIBDEF stacks the previous "null" definition for ISPPLIB
and establishes the ISPPLIB definition for data set 'ISPFPROJ.LWG.PANELS'.
- The fourth LIBDEF concatenates the data set 'ISPFPROJ.ABC.PANELS'
ahead of the data set 'ISPFPROJ.LWG.PANELS' in the current ISPPLIB
definition.
After the third LIBDEF service call the LIBDEF Display Utility
would show:
LIBDEF Utility
ISPF LIBDEF Display Row 1 to 11 of 11
Command ===> Scroll ===> PAGE
Library Type USR Identifier
ISPFILE ** LIBDEF not active **
ISPILIB ** LIBDEF not active **
ISPLLIB ** LIBDEF not active **
ISPMLIB ** LIBDEF not active **
ISPPLIB DATASET ISPFPROJ.LWG.PANELS
S ISPPLIB ** LIBDEF not active **
S ISPPLIB ** LIBDEF not active **
ISPSLIB ** LIBDEF not active **
ISPTABL ** LIBDEF not active **
ISPTLIB ** LIBDEF not active **
After the fourth LIBDEF service call the LIBDEF Display Utility
would show:
LIBDEF Utility
ISPF LIBDEF Display Row 1 to 11 of 11
Command ===> Scroll ===> PAGE
Library Type USR Identifier
ISPFILE ** LIBDEF not active **
ISPILIB ** LIBDEF not active **
ISPLLIB ** LIBDEF not active **
ISPMLIB ** LIBDEF not active **
ISPPLIB DATASET ISPFPROJ.ABC.PANELS
ISPFPROJ.LWG.PANELS
S ISPPLIB ** LIBDEF not active **
S ISPPLIB ** LIBDEF not active **
ISPSLIB ** LIBDEF not active **
ISPTABL ** LIBDEF not active **
ISPTLIB ** LIBDEF not active **
Next, these LIBDEF service calls are issued: ISPEXEC LIBDEF ISPPLIB (restores stacked "null" definition)
Return code = 0
ISPEXEC LIBDEF ISPPLIB (restores stacked "null" definition)
Return code = 0
ISPEXEC LIBDEF ISPPLIB
Return code = 4
|