Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Check Document Library Object (CHKDLO) command verifies that an object exists and that a user has authority to the object before trying to access it.
These checks can be particularly useful before the user tries to access several objects simultaneously. The CHKDLO command is also used to check the validity of object names contained in CL variables and to verify object authorizations under program control.
When the command runs, the system searches for the specified object. If the object is found, the system verifies that the user is authorized to that object as specified on the CHKDLO command. If the object is not found or the user does not have the authority specified on the CHKDLO command, an escape message is sent to the user.
When the CHKDLO command is used in a CL program, the Monitor Message (MONMSG) command follows the CHKDLO command to monitor for messages that result from running this command.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
DLO | Document library object | Character value, *SYSOBJNAM | Required, Positional 1 |
FLR | Folder | Character value, *NONE | Optional, Positional 2 |
SYSOBJNAM | System object name | Name | Optional, Positional 3 |
OBJTYPE | Object type | *ANY, *DOC, *FLR | Optional |
AUT | Authority | *NONE, *ALL, *CHANGE, *USE, *EXCLUDE | Optional |
USRID | User identifier | Single values: *CURRENT Other values: Element list |
Optional |
Element 1: User ID | Character value | ||
Element 2: Address | Character value |
Top |
Specifies the document library object that is checked.
This is a required parameter.
Top |
Specifies the name of the folder containing the document or folder being checked.
Top |
Specifies the system object name of the object that is checked.
Top |
Specifies the type of Document Library Object being checked. OBJTYPE(*DOC) cannot be specified when a document or a folder name is specified on the DLO parameter and FLR(*NONE) is also specified.
Top |
Specifies the type or kind of authority that is checked.
Top |
Specifies the user ID and address of the user for whom the object is being checked. If a user ID and address of someone other than the user who is signed on is specified, the user must have all object (*ALLOBJ) special authority or both users must be enrolled in the system directory and the user who is signed on must be granted permission (using the GRTUSRPMN command) to work on behalf of the specified user. Specifies the user ID and address of the user checking the object.
Single values
Element 1: User ID
Element 2: Address
Note: If a user ID and address for someone other than the user who is signed on the system is specified, the user must have *ALLOBJ special authority, or both users must be enrolled in the system directory and the user who is signed on the system must be granted permission (by using the GRTUSRPMN command) to work on behalf of the specified user. This parameter is useful only when an AUT value other than *NONE is specified.
Top |
CHKDLO DLO(FLR1) OBJTYPE(*ANY) AUT(*NONE) USERID(USER1 ADDR1)
This command checks for the existence of a folder named FLR1 on behalf of a user whose user ID is USER1 and whose address is ADDR1. The user's authority to FLR1 is not checked.
Top |
*ESCAPE Messages
Top |