LNKLST


The LNKLST (LNK) service provides the ability to create, modify, and delete LNKLST sets.

It also provides the ability to

  • make a LNKLST set the active (current) set
  • switch address spaces to the current set
  • display related information

The LNKLST service will also search the user’s JOBLIB/STEPLIB, the LPA, and the current LNKLST set for a specified load module and display where it was found.

General information

The IBM Dynamic LNKLST facility introduced the concept of LNKLST sets. Each address space in the system is assigned to a LNKLST set. A LNKLST set defines the data sets that compose the LNKLST for the address spaces using that LNKLST set. LNKLST set names are one to 16 characters in length. The initial set is named IPL. The IPL set cannot be modified. New address spaces are assigned to the CURRENT set. The name CURRENT is generic and refers to the current LNKLST set, regardless of its actual name.

Here is a list of what you can and cannot do with LNKLST and its various functions:

  • You cannot modify or UNDEFINE a LNKLST set that has address spaces assigned to it.
  • You can use the LNKLST DEACT function or the LNKLST UPDATE function to switch address spaces to the current LNKLST set.
  • You can use the LNKLST ACTIVATE function to make the specified LNKLST set the current LNKLST set.
  • You can use the LNKLST PROCESS function to copy an existing LNKLST set, add data sets to an existing set, or delete data sets from an existing set.
  • You can use the LNKLST UNDEFINE function to remove an existing LNKLST set from the system.
  • You can use the functions STATUS and USERS to display information about the existing LNKLST sets and the address spaces assigned to them.
  • You can use the LOCATE function to search the data sets in the current LNKLST set for the specified load module and display the name of the data set containing the load module.

Syntax

GUID-0964A520-A3A1-41F2-9022-62C2734F2BEF-low.png

Note

All function keywords (first parameter) can be abbreviated to their first their letters.

The parameters are defined as follows: 

Parameter

Description

STATUS

displays a list of the defined LNKLST sets and the number of address spaces that are using each LNKLST set

  • A plus sign (+) preceding a set name indicates that it is the current LNKLST set.
  • A minus sign (-) preceding a set name indicates that the set had been the current set at one time.

LIST

displays a list of the data sets in the specified LNKLST set and their sequence number, volser, APF, and SMS status

If a set name is not specified, the current set is displayed.

USERS

displays a list of address spaces that are currently assigned to the specified LNKLST set

If a set name is not specified, the current set is displayed.

PROCESS

allows you to process a LNKLST set; you must specify at least one suffix

ACTIVATE

allows you to make the specified LNKLST the current set; you must specify a LNKLST set name

UPDATE

changes one or more address spaces to the current LNKLST set

Alternatively, you can specify ALL to indicate all address spaces or a jobname-pattern containing wildcard characters.*

DEACT

changes all address spaces assigned to the specified LNKLST set to the current LNKLST set

UNDEFINE

removes the specified LNKLST set from the system

LOCATE

searches the JOBLIB/STEPLIB, LPA, and the current LNKLST set for the specified load module and displays its location

CURRENT

displays currently active LNKLST set

suffix1, suffix2...suffixn

indicates that one or more member suffixes must be specified after the PROCESS keyword

(The suffixes are appended to PROG to form the member names to be processed.)

asi

address space instance; see Identifying-address-spaces for more information

modname

limits the display to the specified module

Note

IBM permits the use of the question mark (?) and asterisk (*) to create a pattern to identify one or more address spaces. A question mark (?) indicates that any character in that position is to be accepted. An asterisk (*) indicates that zero to one character can be substituted.

For example, A*H indicates that all names that begin with the letter A and end with the letter H are to be accepted. A?H indicates that all three-character names that begin with an A and end with an H are accepted.

Examples

This section provides examples on how to use the LNKLST functions.


LIST

To display a list of the data sets in the IPL set, type

LNK,LIST,IPL

To display a list of the data sets in the current LNKLST set, type

LNK,LIST

or

LNK,LIST,CURRENT


USERS

The USERS function displays a list of the address spaces that are currently assigned to the specified LNKLST set. If a set name is not specified, information for the current LNKLST set is displayed. The information includes the set name, current number of address spaces, the ASID (in hexadecimal), and the job name for each address space.

To display a list of the address spaces that are using the IPL set, type the following command:

LNK,USE,IPL

To display a list of the address spaces that are using the current set, type the following command:

LNK,USE


PROCESS

The primary purpose of PROCESS is to create new LNKLST sets and modify existing sets. However, the functions UPDATE and UNDEFINE are supported as well.

PROCESS reads the specified PROGxx members and processes the following statements:

  • LNKLST DEFINE
  • LNKLST ADD
  • LNKLST DELETE
  • LNKLST UPDATE
  • LNKLST UNDEFINE

Other statements (APF, EXIT SYSLIB, LNKLST TEST, and LNKLST ACTIVATE) are ignored.

Specify the suffixes of the PROGxx members that you want to process as the second parameter of the command. If you specify more than one suffix, you must enclose them in parentheses. For example, the following command will process members PROG01 and PROG03:

LNKLST,PRO,(01,03)

Creating a new LNKLST set or modifying an existing set is a two-step process.

  • First, you need to create a PROGxx member in a data set included in the logical PARMLIB concatenation (formerly SYS1.PARMLIB).
  • Second, use LNKLST, PROCESS to process the statements in PROGxx.

To identify the data sets that are to be included in the new or modified LNKLST set, use the PROG xx statements:

LNKLST DEFINE

LNKLST ADD

LNKLST DELETE

Note

If your PROGxx member contains symbols, they are replaced with their current value.

For example, assume that you want to add a new data set called SYS2.MYLIB to the beginning of the current LNKLST, which is the IPL LNKLST set. Because you cannot modify the IPL set, you create your own LNKLST set (called MYSET) by copying the IPL set, and then adding your data set to the copy.

First, create PARMLIB member PROGMY containing a LNKLST DEFINE statement with the COPYFROM parameter to define the new set, and then copy the data sets from the IPL set. Also include a LNKLST ADD statement to add your data set after SYS1.CSSLIB. Type

PROGMY

lnklst define name(myset) copyfrom(ipl)
lnklst add    name(myset) dsname(sys1.mylib) attop

Note

See the IBM publication, OS/390 MVS Initialization and Tuning Reference, for an explanation of the LNKLST statement used in member PROGxx.

Then use the following LNKLST command to process the member you have created:

LNK,PRO,MY

At this point, you have created LNKLST set MYSET. It is available now but will not be used until it has been activated. Once activated, new address spaces will be assigned to it, but the existing address spaces will continue to use the IPL set until you use either DEACT or UPDATE to switch address spaces to the current set.

If you want to have all address spaces use your new LNKLST set, you could execute the following commands to make MYSET the current set and transfer all address spaces that are using set IPL to the current set:

LNK,ACT,MYSET

LNK,DEACT,IPL


ACTIVATE

The ACTIVATE function makes the specified LNKLST set the current LNKLST set.

Type the following command to make LNKLST set MYSET the current LNKLST set:

LNK,ACT,MYSET


UPDATE

The UPDATE function switches one or more address spaces to the current LNKLST set. You can specify a job name or an ASID. If you specify a job name, you can use the wildcard characters * and ? to select a group of jobs. You can specify an ASID in hexadecimal or decimal format. Indicate that the value is an ASID by enclosing it in parentheses. Indicate that it is a hexadecimal value by prefixing it with an X. Therefore, (123) is a decimal ASID, and (X123) is a hexadecimal ID, equivalent to (291).

Type the following command to switch all address spaces to the current LNKLST set:

LNK,UPDATE,*

Type the following command to switch all jobs (and TSO users), starting with job names beginning with the letters ABC to the current set:

LNK,UPD,ABC*

Type the following command to switch all jobs (and TSO users), with ABC as the first three characters of the job name, any character in the fourth position, a 1 in the fifth position, and any characters in the remaining three positions:

LNK,UPD,ABC?1*


DEACT

The DEACT function switches all address spaces assigned to the specified LNKLST set to the current LNKLST set.

Type the following command to switch all address spaces assigned to LNKLST set MYSET to the current set:

LNK,DEACT,MYSET


UNDEFINE

The UNDEFINE function removes the specified LNKLST set from the system. A LNKLST set cannot be removed if any address spaces are using it. In addition, the IPL set cannot be removed.

Note

You can use DEACT to switch all of the address spaces to the current set.

Type the following command to remove LNKLST set MYSET from the system:

LNK,UND,MYSET


LOCATE

The LOCATE function searches the JOBLIB/STEPLIB, LPA, and current LNKLST set for the specified load module. If the module is found in the JOBLIB/STEPLIB concatenation, the concatenation number is displayed (the first data set is number 1). If the load module is found in the current LNKLST set, the name of the data set in which it was found is displayed.

Related topic



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*