About the accounting code

The initial accounting code (up to 15 characters in length) for a job is determined by the value of the ACGCDE (accounting code) parameter in the job description and user profile for the job.

When a job is started, a job description is assigned to the job. The job description object contains a value for the ACGCDE parameter. If the default of *USRPRF is used, the accounting code in the job's user profile is used.
Note: When a job is started using the Submit Job (SBMJOB) command, its accounting code is the same as that of the submitter's job.
You can change the accounting code after the job has entered the system by using the Change Accounting Code (CHGACGCDE) command.

The CRTUSRPRF and CHGUSRPRF commands support the ACGCDE parameter. The default is *BLANK. If all work for a particular user is to be recorded under one accounting code, only user profiles need to be changed. You can change the accounting codes for specific job descriptions by specifying the accounting code for the ACGCDE parameter on the CRTJOBD and CHGJOBD commands. The CHGACGCDE command also allows different accounting codes in a single job.

The Retrieve Job Attributes (RTVJOBA) command and the API's that retrieve job attributes allow you to access the current accounting code in a CL program.

Related concepts
How job accounting works
When to use job accounting
Security and job accounting
Journal entries for job accounting
Resource accounting
Resource accounting data
Prestart jobs and job accounting
System job processing for job accounting
Batch processing and job accounting
Interactive processing and job accounting
Printer file accounting
Related information
Job Notification Exit Point