Change Department (QOKCHGDP) API


  Required Parameter Group:

1 Department Input Char(10)
2 Title Input Char(50)
3 Manager Input Char(16)
4 Reports to department Input Char(10)
5 New department name Input Char(10)
6 Allow duplicate departments Input Char(1)
7 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Change Department (QOKCHGDP) API changes department information in the system distribution directory. To add and remove members from within a department use the DEPT parameter on the Add Directory Entry (ADDDIRE) and Change Directory Entry (CHGDIRE) CL commands.


Authorities and Locks

Changing a department requires *SECADM (security administrator) authority.


Required Parameter Group

Department
INPUT; CHAR(10)

The department name to change. The department name must not be blank. When there are duplicate department names in the directory, the first match found is changed. The department name value is not case sensitive when being checked.

Title
INPUT; CHAR(50)

The descriptive title of the department. If this field is to remain unchanged, you must use *SAME for the field value. Blanks change the field to blanks.

Manager
INPUT; CHAR(16)

The department manager's user ID and address. The first 8 characters contain the user ID and the last 8 contain the address. The manager user ID and address must exist in the system distribution directory if specified. If this field is to remain unchanged, you must use *SAME for the field value. Blanks change the field to blanks.

Reports to department
INPUT; CHAR(10)

The department to which this department reports. If a department that does not exist in the system distribution directory is specified, it is automatically created. If this field is to remain unchanged, you must use *SAME for the field value. Blanks change the field to blanks. The department name value is not case sensitive when being checked.

New department.
INPUT; CHAR(10)

The new department name. If the department name is not to be changed, you must use *SAME for the field value. Blanks are not allowed. If this field is not *SAME, the department name is changed to this value. This changes the department value in all the system distribution directory entries that are members of the department being renamed.

Allow duplicate departments
INPUT; CHAR(1)

Whether to allow duplicate department names. The valid values are:

0 Do not allow duplicate department names.
1 Allow duplicate department names.

The department name value is not case sensitive when checking for duplicate departments.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF89A3 E Operation not successful due to authority reasons.
CPF89A4 E Operation not successful due to data validation reasons.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPF9A8D E Error occurred with &5 API. Reason code is &1.


API introduced: V3R6

[ Back to top | Office APIs | APIs by category ]