SP-COPY - Copying Print Jobs to Another Job File

Copies jobs' print data items from one job file to another.

Syntax

SP-COPY source-job-file{,source-data-section} {source-job-list} {(options}
TO:{
(dest-job-file{,dest-data-section}} {dest-job-list}

Syntax Elements

source job-file The name of the job file's dictionary and default data section from which print data is to be copied.

source-data-section
A non-default data section name of the job file from which print data is to be copied.

source-job-list One or more job-ids, separated by spaces, specifying the print job data to be copied.

dest-job-file The name of the job file default data section to which print data is to be copied. If you do not specify dest-job-file, SP-COPY defaults to the source file.

dest-data-section A non-default data section name of the job file to which print data is to be copied.

dest-job-list One or more item-ids, separated by spaces, specifying the identities of the print job to which data is to be copied.

Options

D Delete the source jobs after the items are copied.

Restrictions

Only the destination file can be remote.

Both source and destination files must be data level files. The DICT modifier cannot be used.

Processing

SP-COPY copies the print job data item to the specified destination job file and updates the attribute which specifies the job file in the PRINT.JOB.CONTROL item.

Copying to Existing Job-id

If the specified destination job-id already exists in the PRINT.JOB.CONTROL file, SP-COPY still copies the job and creates a job item with a new identity comprising the existing job-id with a four digit number appended. This applies if you do not specify the destination job-id, as you are attempting to create a job-id the same as the source id.

Examples

SP-COPY SPOOL.JOBS 13
TO: (DAVE.JOBS DAVE0007

Copies print job 13 from SPOOL.JOBS to job file DAVE.JOBS and creates a new job-id DAVE0007 for it.

SP-COPY SPOOL.JOBS 15
TO: (ADMIN.JOBS

Copies Job 15 from SPOOL.JOBS to the job file ADMIN.JOBS and attempts to give it the same job-id (15). Because job-id 15 already identifies the source job, it creates the print job, in ADMIN.JOB, but gives it the job-id 150001. If you repeated this operation then Job 150002 would be created, and so on.