Add Access Code (ADDACC)

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

The Add Access Code (ADDACC) command allows you to define a new access code to the system for later use when securing a document or folder, or on commands dealing with object authority or access authority. The Add Access Code (ADDACC) command identifies both the access code added and the descriptive text that is associated with the access code.

Restrictions:

To use this command, you must have all object (*ALLOBJ) authority.

Top

Parameters

Keyword Description Choices Notes
ACC Document access code 1-2047, *AVAIL Required, Positional 1
TEXT Text 'description' Character value Required, Positional 2
Top

Document access code (ACC)

Specifies the access code that is added to the system. The access code must not be currently defined on the system.

This is a required parameter.

*AVAIL
The system chooses the next free access code and adds that access code to the system; you must specify the text. The access code selected is returned to you in a completion message.
1-2047
Specify an access code to be added to the system.
Top

Text 'description' (TEXT)

Specifies the text that briefly describes the object.

This is a required parameter.

character
Specify no more than 50 characters of text, enclosed in apostrophes.
Top

Examples

Example 1: Adding an Access Code

ADDACC   ACC(700)  TEXT('programmers')

This command adds access code 700 to the system. This access code is authorized to all programmers (after the GRTACCAUT command is run). It is used when filing documents to which all programmers may have access.

Example 2: Adding Next Available Access Code

ADDACC   ACC(*AVAIL)  TEXT('department managers')

This command adds the next available access code to the system. This access code is authorized to all department managers (after the GRTACCAUT command is run). It is used when placing in the document library objects to which all department managers may have access. The system returns a message containing the access code that was being used.

Top

Error messages

*ESCAPE Messages

CPF897B
Mail Log Conversion failed.
CPF9001
Add access code request failed.
CPF9009
System requires file &1 in &2 be journaled.
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.
Top