DSPDSTL (Display Distribution List) Command Description
DSPDSTL Command syntax diagram
Purpose
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 as follows:
- For displayed output, a list of distribution lists is displayed. When a specific list identification (ID) has been specified in the LSTID parameter, the displayed list contains only the specified distribution list.
- For printed or database file output, if the LSTID parameter specifies *ALL, the DETAIL parameter determines whether a list of distribution lists or a list of entries in each distribution list is the output. When the LSTID parameter specifies a list, a list of entries in the distribution list is the output.
No distribution lists can be created or deleted, nor can updates be made to existing lists from this command. These functions are provided interactively, with display support by the Work with Distribution List (WRKDSTL) command, and with the Create Distribution List (CRTDSTL), Delete Distribution List (DLTDSTL), Add Distribution List (ADDDSTLE), and Remove Distribution List (RMVDSTLE) commands.
Optional Parameters
- LSTID
- Specifies which distribution lists to display, print, or write 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 or a list of the entries in each list is the output.
Element 1: List Identifier
list-ID: Specify the list identifier (ID) of the distribution list.
Element 2: List Qualifier
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.
- 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
- 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. More information on this parameter is in commonly used parameters.
*: 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.
- OUTFILE
- Specifies the name of the database file to which the output of the display is directed. If the database file does not exist, this command creates it in the specified library. If no library is specified, the database file is created in the user default library specified in the user profile. If no default library was specified, the database file is created in the QGPL library. If the file is created, the text is "OUTFILE for DSPDSTL" and the public authority is *EXCLUDE.
The name of the database file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list 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.
database-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 it is specified. If the default library was not specified, the file is created in the QGPL library.
- 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.
Element 1: Member to Receive Output
*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.
Element 2: Operation to Perform on Member
*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.
- DETAIL
- Specifies how much detail is printed or written to the database file. This parameter is not used when the output is displayed (OUTPUT(*)) or when a specific list ID is specified in the LSTID parameter.
Anytime LSTID(*ALL) is specified, the DETAIL parameter is used to determine whether a list of all distribution lists or a list of all entries in every distribution list is the output.
Model output file QAOSDSTO in library QSYS is used.
*BASIC: The output is a list of all distribution lists contained in the directory.
*FULL: The output contains all of the entries in every distribution list contained in the directory.
- CMDCHRID
- Specifies the character identifier (graphic character set and code page) for data being specified as parameter values on this command. This character identifier (CHRID) is related to the display device used to specify the command. More information about CHRID processing is in the Application Display Programming book.
*SYSVAL: The system determines the graphic character set and code page values for the command parameters from the QCHRID system values.
*DEVD: The system determines the graphic character set and code page values for the command parameters from the display device description where this command was entered. This option is supported only when the command is entered from an interactive job. If this option is specified in a batch job, an error message is returned.
Element 1: Character Set
graphic-character-set: Specify the graphic character set values used to create the command parameters. Valid values range from 1 through 9999.
Element 2: Code Page
code-page: Specify the code page. Valid values range from 1 through 9999.
Examples for DSPDSTL
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 for DSPDSTL
*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.