CL Command Reference - CPYJOBJS

CL Command List > CPYJOBJS Reference

Description:

The Copy Job using Job Scheduler (CPYJOBJS) command allows you to copy a job or jobs and all its parameters to create a new job or jobs. You can copy the job on the same system or you can copy the job to a remote location name that you specify or you can copy the job to a different data library on the same system. After creating a new job, you can modify and change any or all of the associated parameters.

You can copy all jobs in a group to a new group that you specify. When copying a group, you must specify *ALL in the Job and Group sequence fields for the From job, and *SAME in the Job and Group sequence fields for the To job.

You can specify whether to copy dependencies, where you want to copy the job and what actions you should take when copying the job. You can print a report to analyze the effect of copying a job or jobs prior to processing the actual job copy.


Examples:

Example 1: Copying a Job to a New Job

CPYJOBJS FROMJOB(JOB02) TOJOB(JOB03) CPYDEP(*YES)

This command copies JOB02 to a new job called JOB03. The job dependencies from JOB02 are copied to JOB03.