CL Command Reference - CHGJOBSCDE
CL Command List > CHGJOBSCDE Reference
Description:
The Change Job Schedule Entry (CHGJOBSCDE) command allows you to change an entry in the job schedule.
The job schedule entry contains all of the information needed to automatically submit a batch job. You can use this command to change:
. The command the job runs
. The date and time at which a job is scheduled to run
. The recovery action the system takes if the job cannot be submitted at the scheduled time
. The job description and user profile under which the job is run
. The job queue on which the job is placed when it is submitted
. The message queue to which messages are sent
Each job schedule entry is identified by the job name, which is specified for the JOB parameter of this command, and an entry number, which is assigned by the system when the entry is added. The message sent when an entry is added contains the entry number. If there is more than one entry with the same job name, you may need to specify the number when changing the entry using this command, removing the entry using the Remove Job Schedule Entry (RMVJOBSCDE) command, or when holding or releasing the entry using the Hold Job Schedule Entry (HLDJOBSCDE) or Release Job Schedule Entry (RLSJOBSCDE) command. You can use the Work with Job Schedule Entries (WRKJOBSCDE) command to show or print entries.
Restrictions:
1. The issuer of this command must be running under a user profile which is the same as the job user identity of the job schedule entry 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. To use this command, you must have:
. use (*USE) authority to the command specified by the Command to run (CMD) parameter and execute (*EXECUTE) authority to the library containing that command.
. use (*USE) authority to the job description (JOBD) and execute (*EXECUTE) authority to the library containing that job description.
. use (*USE) authority to the job queue (JOBQ) and execute (*EXECUTE) authority to the library containing that job queue.
. use (*USE) authority to the user profile (USER) that the job is to run under.
. use (*USE) and add (*ADD) authority to the message queue (MSGQ), and execute (*EXECUTE) authority to the library containing that message queue.
. change (*CHANGE) authority to object QDFTJOBSCD, type *JOBSCD, in library QUSRSYS and execute (*EXECUTE) authority to library QUSRSYS.
Examples:
Example 1: Changing a Job Schedule Entry
CHGJOBSCDE JOB(BACKUP) ENTRYNBR(001584) JOBQ(QGPL/QBATCH)
This command changes job schedule entry BACKUP number 001584 so that its jobs are submitted to job queue QBATCH in library QGPL.
Example 2: Changing a Job Schedule Entry
CHGJOBSCDE JOB(EXAMPLE) ENTRYNBR(*ONLY) CMD(CALL PGM(A))
FRQ(*WEEKLY) SCDDATE(121503) SCDTIME(110000)
This command schedules a batch job to run program A at 11 a.m. on 12/15/03 and every week on that same day.