In this example, the COPYPROC Process takes an existing file on the primary node (TEST.INPUT.FILE) and copies it to the secondary node naming the new file CD.jobID.jobname.submitjobuserID.FILE. The resultant file name contains the job number, job name, and the ID of the user who submitted the job for easy identification.
SAMPLE PROCESS COPYPROC
COPYPROC PROCESS -
SNODE=CD.SNODE -
&VAR1=%JOBID -
&JOBID=%JOBID -
&JOBNM=%JOBNM -
&JUSER=%JUSER
*
VAR1 COPY FROM (PNODE DSN=TEST.INPUT.FILE -
DISP=SHR ) -
TO (SNODE -
DSN=CD.&VAR1..FILE -
DISP=(,CATLG) -
SPACE=(CYL,(5,5),RLSE) -
UNIT=SYSDA)
JOBID COPY FROM (PNODE DSN=TEST.INPUT.FILE -
DISP=SHR ) -
TO (SNODE -
DSN=CD.&JOBID..FILE -
DISP=(,CATLG) -
SPACE=(CYL,(5,5),RLSE) -
UNIT=SYSDA)
JOBNM COPY FROM (PNODE DSN=TEST.INPUT.FILE -
DISP=SHR ) -
TO (SNODE -
DSN=CD.&JOBNM..FILE -
DISP=(,CATLG) -
SPACE=(CYL,(5,5),RLSE) -
UNIT=SYSDA)
JUSER COPY FROM (PNODE DSN=TEST.INPUT.FILE -
DISP=SHR ) -
TO (SNODE -
DSN=CD.&JUSER..FILE -
DISP=(,CATLG) -
SPACE=(CYL,(5,5),RLSE) -
UNIT=SYSDA)
|
To initiate the file transfer, you can use any of the following SUBMIT statements:
SUBMIT PROC=COPYPROC,NEWNAME=%JOBNM
|
SUBMIT PROC=COPYPROC,NEWNAME=%JOBID,&VAR1=%JOBNM
|
SUBMIT PROC=COPYPROC,&JOBNM=%JOBNM,&JUSER=%JUSER
|