Display Nickname (DSPNCK)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Display Nickname (DSPNCK) command is used to display, print, or create a database output file for nicknames in the system distribution directory.

A nickname is a short version of either a directory entry or a distribution list name. More information about nicknames is in the SNA Distribution Services book, SC41-5410.

Output from this command is directed as follows:

Restriction: You must be the owner to display a private nickname. No special authority is needed to display a private nickname that you own or a public nickname.

Top

Parameters

Keyword Description Choices Notes
NCK Nickname Element list Optional, Positional 1
Element 1: Nickname Character value, *ALL
Element 2: Access *PRV, *ALL, *PRIVATE, *PUBLIC
TYPE Type of nickname *ALL, *USER, *LIST Optional
OWNER Owner Name, *ALL, *CURRENT Optional, Positional 2
OUTPUT Output *, *PRINT, *OUTFILE Optional, Positional 3
OUTFILE File to receive output Qualified object name Optional, Positional 4
Qualifier 1: File to receive output Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTMBR Output member options Element list Optional
Element 1: Member to receive output Name, *FIRST
Element 2: Replace or add records *REPLACE, *ADD
Top

Nickname (NCK)

Specifies the nicknames to display, print, or write to a database file.

The possible nickname values are:

*ALL
All nicknames in the system distribution directory are directed for output.
nickname
Specify the nickname for which detailed information is to be directed for output.

The possible nickname access values are:

*PRV
The last access specified by the current user for displaying, selecting, or working with nicknames is used.
*ALL
All of the nicknames to which you have access are directed for output. This includes the private nicknames that you own and all of the public nicknames in the system distribution directory.
*PRIVATE
The private nicknames that you own are directed for output.
*PUBLIC
All of the public nicknames in the system distribution directory are directed for output.
Top

Type of nickname (TYPE)

Specifies the type of nicknames (user or list) to display, print, or write to a database file.

*ALL
All nicknames of both the user and list types are directed for output.
*USER
The user nicknames are directed for output.
*LIST
The list nicknames are directed for output.
Top

Owner (OWNER)

Specifies the owner of the nicknames to display, print, or write to a database file.

*ALL
The nicknames owned by all user profiles are directed for output. This does not include the private nicknames to which the user does not have access.
*CURRENT
The nicknames owned by the current user are directed for output.
user-profile-name
Specify the user profile of the owner whose nicknames are to be directed for output.
Top

Output (OUTPUT)

Specifies whether the output from the command is shown at the requesting work station, printed with the job's spooled output or written to a database file.

*
The output requested by an interactive job is shown on the display. If the command is run as part of a batch job, the output is printed with the job's spooled output.
*PRINT
The output is printed with the job's spooled output.
*OUTFILE
The output is directed to the database file specified on the OUTFILE parameter.
Top

File to receive output (OUTFILE)

Specifies the name of the database file to which output is to be directed. If the file does not exist, this command creates the database file in the specified library. Text for the created file is "OUTFILE for DSPNCK" and the public authority is *EXCLUDE.

Note: This parameter is required when OUTPUT(*OUTFILE) is specified.

The name of the database file can be qualified by one of the following library values:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name
Specify the name of the library to be searched.

The possible value is:

database-file-name
Specify the name of the database file to receive the output. If the file does not exist, it is created in the specified library. If the file does not exist and no library is specified, or if the file is qualified with *LIBL and the system cannot find the file, the database file is created in the user default library. The user default library is specified in the user profile of the current user. If no default library is specified in the user profile, the QGPL library is used.
Top

Output member options (OUTMBR)

Specifies the name of the database file member to which the output is directed. If a member already exists, the system uses the second element of this parameter to determine whether the member is cleared before the new records are added. If the member does not exist and a member name is not specified, the system creates a member with the name of the output file specified on the OUTFILE parameter. If an output file member name is specified, but the member does not exist, the system creates it.

The possible Member to Receive Output Values are:

*FIRST
The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified on the OUTFILE parameter.
member-name
Specify the file member that receives the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it.

The possible Action on Member values are:

*REPLACE
The system clears the existing member and adds the new records.
*ADD
The system adds the new records to the end of the existing records.
Top

Examples

Example 1: Displaying a List of Nicknames

DSPNCK   NCK(*ALL *PRIVATE)

This command shows a list of private nicknames to the owner of the nicknames. The owner can request to show or print additional information for the nicknames shown.

Example 2: Printing a List of Nicknames

DSPNCK   NCK(MANAGER *PRIVATE)  OUTPUT(*PRINT)

This command prints detailed information on the user's private nickname MANAGER.

Example 3: Directing Nicknames to a Database File

DSPNCK   NCK(*ALL *PUBLIC)  OUTPUT(*OUTFILE)  OUTFILE(ALLNICKS)
         OUTMBR(*FIRST *REPLACE)

This command directs one record for each public nickname in the directory to the database file ALLNICKS. If this file is not found in the library list (the default library qualifier), it is created in the user's default library or in the QGPL library if no user default library is specified.

Example 4: Directing Nicknames for an Owner to a Database File

DSPNCK   NCK(*ALL *PUBLIC)  OWNER(CDJONES)  OUTPUT(*OUTFILE)
         OUTFILE(NICKNAME/CDJONES)
         OUTMBR(*FIRST *REPLACE)

This command directs one record for each public nickname owned by the user whose user profile is CDJONES to the database file CDJONES in the library NICKNAME. If this file is not found in the library NICKNAME, it is created.

Top

Error messages

*ESCAPE Messages

CPF9A89
Nickname function not successful.
CPF9009
System requires file &1 in &2 be journaled.
CPF9820
Not authorized to use library &1.
CPF9822
Not authorized to file &1 in library &2.
CPF9838
User profile storage limit exceeded.
CPF9845
Error occurred while opening file &1.
CPF9846
Error while processing file &1 in library &2.
CPF9847
Error occurred while closing file &1 in library &2.
CPF9850
Override of printer file &1 not allowed.
CPF9851
Overflow value for file &1 in &2 too small.
CPF9860
Error occurred during output file processing.
Top