CL Command Reference - CHGPJ

CL Command List > CHGPJ Reference

Description:

The Change Prestart Job (CHGPJ) command changes the job attributes of the prestart job in which this command is issued to those in the job description specified in the prestart job entry, or to those in the job description specified in the user profile of the current user. When a program start request is received, the system will set the current user to the user profile specified in the program start request. The current user may subsequently be set to a different value by the Set Profile (QWTSETP) API.

Restrictions:

1. To use this command, you must have: v use (*USE) authority to the job description and execute (*EXECUTE) authority to the library that contains that job description. v read (*READ) authority to the output queue (OUTQ) and execute (*EXECUTE) authority to the library that contains that output queue.

2. This command must only be called by a prestart job that is servicing a program start request. This command will not work against batch prestart jobs.

3. This command is conditionally threadsafe. Refer to Considerations for Attribute Thread Safety for additional information.



Examples:

Example 1: Changing the Output Priority

CHGPJ OUTPTY(*PGMSTRRQS)

This command changes the output priority for spooled files produced by this job to the output priority in the job description associated with the user profile of the current user.



Example 2: Changing the Output Queue

CHGPJ OUTQ(*PJE)

This command changes the output queue for spooled files produced by this job to the output queue in the job description specified in the prestart job entry.