Display Distribution List (DSPDSTL)

The Display Distribution List (DSPDSTL) command is used to display, print, or create a database output file for distribution lists contained in the distribution directory. No distribution lists can be created or deleted, nor can updates be made to existing lists from this command.

Parameters

Keyword Description Choices Notes
LSTID List identifier Single values: *ALL
Other values: Element list
Optional, Positional 1
Element 1: List ID Character value
Element 2: List ID qualifier Character value
OWNER Owner Name, *ALL, *CURRENT Optional, Positional 2
OUTPUT Output *, *PRINT, *OUTFILE Optional, Positional 3
OUTFILE File to receive output Qualified object name Optional
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
DETAIL Detail *BASIC, *FULL Optional
CMDCHRID Command character identifier Single values: *SYSVAL, *DEVD
Other values: Element list
Optional
Element 1: Graphic character set Integer
Element 2: Code page Integer

List identifier (LSTID)

Specifies which distribution lists to display, print, or direct to a database file.

*ALL
All distribution lists in the system distribution directory are included in the output. The entries are provided in alphabetical order by list ID. If the output is a printed list or output file, the DETAIL parameter determines whether a list of distribution lists of a list of the entries in each list is the output.

The possible list identifier value is:

list-ID
Specify the list identifier (ID) of the distribution list.

The possible list qualifier value is:

list-ID-qualifier
Specify the list ID qualifier of the distribution list.

Note: The distribution list identifier has two parts, the ID and the qualifier, separated by at least one space. If lowercase characters are specified, the system changes them to uppercase.

The naming rules for the two-part list ID are identical to the rules for the user ID and address. A complete description of these rules is in the SNA Distribution Services book, SC41-5410.

Owner (OWNER)

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

*ALL
The distribution lists owned by all user profiles are directed for output.
*CURRENT
The distribution lists owned by the current user are directed for output.
user-profile-name
Specify the user profile of the owner whose distribution lists are to be directed for output.

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.

*:
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.

File to receive output (OUTFILE)

Specifies the name of the database file to which the output of the display is directed. If the output file does not exist, this command creates a database file in the specified library. If no library is specified, the database file is created in QGPL.

If the file is created, the text is 'OUTFILE created by DSPDSTL' and the public authority to the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.

The possible library values are:

*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 used to locate the database file. If no library is specified as the current library for the job, QGPL is used.
library-name
Specify the name of the library where the database file is located.
data-base-file-name
Specify the name of the database file that receives the output of the display. If the database file is qualified with *LIBL but the system cannot find the file, one is created in the user's default library, if specified. If the default library was not specified, the file is created in QGPL.

Note: If a new file is created, system file QAOSDSTO in system library QSYS with a format name of OSDSTL is used as a model.

Output member options (OUTMBR)

Specifies the name of the database file member to which the output of the display is directed. If a member already exists, the system uses the second part 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 file specified on the File to receive output (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 output file receives the output.
member-name
Specify the name of the output file member that receives the output.

The possible replace or add records values are:

*REPLACE
The new data replaces the data currently contained in the output file member. The member is cleared when the file is opened.
*ADD
The member is not cleared. The new data is added to the database file member.

Detail (DETAIL)

Specifies how much detail should be printed or directed to the database file. This parameter is not used when * is specified on the Output (OUTPUT) parameter or when a specific list ID was specified on the List identifier (LSTID) parameter. When *ALL is specified on the LSTID parameter, this parameter is used to determine whether a list of all distribution lists or a list of all entries in every distribution list is used as the output.

*BASIC
The list or output in the database file contains only a list of all distribution lists contained in the directory.
*FULL
The list or output in the database file contains all of the entries in every distribution list contained in the directory.

Command character identifier (CMDCHRID)

Specifies the character identifier (graphic character set and code page) for the data being entered as command parameter values.

Note:

Single values

*SYSVAL
The system determines the graphic character set and code page values for the command parameters from the QCHRID system value.
*DEVD
The system determines the graphic character set and code page values from the display device description where this command was entered. This option is valid only when entered from an interactive job. If this option is specified in a batch job, an error occurs.

Element 1: Graphic character set

1-32767
Specify the graphic character set to use.

Element 2: Code page

1-32767
Specify the code page to use.

Note:

Examples

Example 1: Displaying a List

DSPDSTL   LSTID(*ALL)  OUTPUT(*)

This command displays a list of all distribution lists in the directory. Specifying DSPDSTL without parameters would result in the same action.

Example 2: Printing a List

DSPDSTL   LSTID(DEPT48K DISTLIST)  OUTPUT(*PRINT)

This command prints a list of all entries in the distribution list DEPT48K DISTLIST. The detail parameter is not used when printing for a specific list.

Example 3: Directing Output to a Database File

DSPDSTL   OUTPUT(*OUTFILE)
          OUTFILE(ALLLISTS)  OUTMBR(*FIRST *REPLACE)
          DETAIL(*BASIC)

This command writes one record for each distribution list contained in the directory to the database file ALLLISTS. If this file is not found in the library list, it is created in the QGPL library, since no library is specified.

Example 4: Directing Output for a Distribution List Owner to a Database File

DSPDSTL   OWNER(ABSMITH)  OUTFILE(DISTLIST/ABSMITH)
          OUTMBR(*FIRST *REPLACE)  DETAIL(*BASIC)

This command writes one record for each distribution list owned by user profile ABSMITH to the database file ABSMITH in the library DISTLIST. If this file is not found in the library DISTLIST, it is created.

Error messages

*ESCAPE Messages

CPF905C
Error occurred trying to find a translation table.
CPF9052
List ID, &1 &2, cannot be found.
CPF9096
Cannot use CMDCHRID(*DEVD), DOCCHRID(*DEVD) in batch job.
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.