Display SMTP Dist List (DSPSDSTL)
| Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Display SMTP Distribution List (DSPSDSTL) command is used to display, print, or create a database output file for distribution lists.
| Top |
Parameters
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| LSTID | List ID | Character value, *ALL | Optional, Positional 1 |
| OWNER | Owner | Name, *ALL, *CURRENT | Optional, Positional 2 |
| OUTPUT | Output | *, *PRINT, *OUTFILE | Optional, Positional 3 |
| OUTFILE | Output file | Qualified object name | Optional, Positional 4 |
| Qualifier 1: Output file | Name | ||
| Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
| OUTMBR | Output member | Element list | Optional, Positional 5 |
| Element 1: Member to receive output | Name, *FIRST | ||
| Element 2: Replace or add records | *REPLACE, *ADD | ||
| DETAIL | Detail | *BASIC, *FULL | Optional, Positional 6 |
| Top |
List ID (LSTID)
Specifies which distribution lists to display, print, or direct to a database file.
- *ALL
- All distribution lists are included in the output. 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.
The possible list identifier value is:
- list-ID
- Specify the list identifier (ID) of the distribution list.
| Top |
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.
| 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.
- *:
- 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 |
Output file (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 DSPSDSTL' 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.
| Top |
Output member (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 Output file (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.
| Top |
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 List ID (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.
- *FULL
- The list or output in the database file contains all of the entries in every distribution list.
| Top |
Examples
Example 1: Displaying a List
DSPSDSTL LSTID(*ALL) OUTPUT(*)
This command displays a list of all distribution lists. Specifying DSPSDSTL without parameters would result in the same action.
Example 2: Printing a List
DSPSDSTL LSTID(DISTLIST) OUTPUT(*PRINT)
This command prints a list of all entries in the distribution list DISTLIST. The detail parameter is not used when printing for a specific list.
Example 3: Directing Output to a Database File
DSPSDSTL 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
DSPSDSTL 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.
| Top |
Error messages
*ESCAPE Messages
- TCP96C8
- List ID, &1, cannot be found.
- TCP96C9
- List ID &1 is not a valid name.
- CPF9820
- Not authorized to use library &1.
- CPF9822
- Not authorized to file &1 in library &2.
- 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 |