Change Prestart Job (CHGPJ)
Where allowed to run: All environments (*ALL) Threadsafe: Conditional |
Parameters Examples Error messages |
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:
- To use this command, you must have:
- use (*USE) authority to the job description and execute (*EXECUTE) authority to the library that contains that job description.
- read (*READ) authority to the output queue (OUTQ) and execute (*EXECUTE) authority to the library that contains that output queue.
- 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.
- This command is conditionally threadsafe. Refer to Considerations for Attribute Thread Safety for additional information.
Considerations for Attribute Thread Safety:
This command is intended to be used to change the job attributes for the prestart job that the command was issued in. All of the attributes are scoped to the job.
The Threadsafe column of the following table indicates whether the attributes can be changed in a manner that is threadsafe.
Yes: - Attributes marked with this value are considered to be threadsafe. These attributes can be changed safely by issuing this command from either the initial thread or from a secondary thread.
No: - Attributes marked with this value are not threadsafe. An attempt to change these attributes will be denied if multiple threads are active.
Attribute and Thread Safety Table:
Attribute Threadsafe ---------------------------- ---------- Job accounting code (ACGCDE) No Output priority (OUTPTY) Yes Output queue name (OUTQ) Yes Print text (PRTTXT) Yes Printer device name (PRTDEV) Yes |
Top |
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
OUTPTY | Output priority (on OUTQ) | *SAME, *PGMSTRRQS, *PJE | Optional |
PRTTXT | Print text | *SAME, *PGMSTRRQS, *PJE | Optional |
PRTDEV | Print device | *SAME, *PGMSTRRQS, *PJE | Optional |
OUTQ | Output queue | *SAME, *PGMSTRRQS, *PJE | Optional |
ACGCDE | Accounting code | *SAME, *PGMSTRRQS, *PJE | Optional |
Top |
Output priority (on OUTQ) (OUTPTY)
Specifies the output priority for spooled output files that are produced by this job. Only those spooled output files which are on output queues in the library name space of the thread issuing this command will be changed.
- *SAME
- This value does not change.
- *PGMSTRRQS
- The value specified in the job description for the user profile of the current user is used.
- *PJE
- The value specified in the job description for the prestart job entry in the subsystem description is used.
Top |
Print text (PRTTXT)
Specifies the text that is printed at the bottom of each page of printed output and on separator pages.
- *SAME
- This value does not change.
- *PGMSTRRQS
- The value specified in the job description for the user profile of the current user is used.
- *PJE
- The value specified in the job description for the prestart job entry in the subsystem description is used.
Top |
Print device (PRTDEV)
Specifies the name of the default printer device for this job.
- *SAME
- This value does not change.
- *PGMSTRRQS
- The value specified in the job description for the user profile of the current user is used. If *USRPRF is specified for this parameter value in the job description, the value from the user profile of the current user is used.
- *PJE
- The value specified in the job description for the prestart job entry in the subsystem description is used. If *USRPRF is specified for this parameter value in the job description, the value from the user profile for the prestart job entry (USER parameter) is used.
Top |
Output queue (OUTQ)
Specifies the name of the output queue that is used for spooled output produced by the prestart job. This does not affect files previously created by the prestart job.
- *SAME
- This value does not change.
- *PGMSTRRQS
- The value specified in the job description for the user profile of the current user is used. If *USRPRF is specified for this parameter value in the job description, the value specified in the user profile of the current user is used.
- *PJE
- The value specified in the job description for the prestart job entry in the subsystem description is used. If *USRPRF is specified for this parameter value in the job description, the value specified in the user profile for the prestart job entry (USER parameter) is used.
Top |
Accounting code (ACGCDE)
Specifies the accounting code that is used for this job.
- *SAME
- The accounting code does not change.
- *PGMSTRRQS
- The value specified in the job description for the user profile of the current user is used. If *USRPRF is specified for this parameter value in the job description, the value specified in the user profile of the current user is used.
- *PJE
- The value specified in the job description for the prestart job entry in the subsystem description is used. If *USRPRF is specified for this parameter value in the job description, the value specified in the user profile for the prestart job entry (USER parameter) is used.
Top |
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.
Top |
Error messages
*ESCAPE Messages
- CPF1314
- Value &1 for parameter &2 not allowed.
- CPF1317
- No response from subsystem for job &3/&2/&1.
- CPF1321
- Job &1 user &2 job number &3 not found.
- CPF1332
- End of duplicate job names.
- CPF1334
- Must be an interactive job for requested change.
- CPF1336
- Errors on CHGJOB command for job &3/&2/&1.
- CPF1337
- &3/&2/&1 not authorized to change parameters.
- CPF1340
- Job control function not performed.
- CPF1341
- Reader or writer &3/&2/&1 not allowed as job name.
- CPF1343
- Job &3/&2/&1 not valid job type for function.
- CPF1344
- Not authorized to control job &3/&2/&1.
- CPF1351
- Function check occurred in subsystem for job &3/&2/&1.
- CPF1352
- Function not done. &3/&2/&1 in transition condition.
Top |