CL Command Reference - CHGACGCDE

CL Command List > CHGACGCDE Reference

Description:

The Change Accounting Code (CHGACGCDE) command changes the accounting code of a job. The job can be on a job queue, or it can be active in a subsystem. This command has no effect if the job is on an output queue. If the command is entered when system value QACGLVL indicated that job accounting (*JOB) should be performed when the job entered the system, accounting information is journaled and a new accounting segment is started for the job. If the command is entered when the system value QACGLVL did not indicate job accounting should be performed, the accounting code is changed, but no journal entry is made.

Restrictions:

1. The command must be issued from within the job being changed, or the issuer of the command must be running under a user profile which is the same as the job user identity of the job being changed, or the issuer of the command must be running under a user profile which has job control (*JOBCTL) special authority. The job user identity is the name of the user profile by which a job is known to other jobs.

2. This command is conditionally thread safe. Access will be denied if the job being changed has secondary threads active. This command may be issued from either the initial thread or a secondary thread of a multi-threaded job if the target job is single threaded.


Examples:

CHGACGCDE JOB(123581/USER47/WS1) ACGCDE(123456789)

This command changes the accounting code for job WS1, with user profile USER47, and job number 123581, to accounting code 123456789 for the next accounting segment. A job resource usage journal entry is written to the system accounting journal QSYS/QACGJRN.