Example: Using JCL and OCOPY
Alternatively, TURBO could specify the ddnames in the DD statements
and perform the OCOPY in the JCL for a batch job. A DD statement allocates
a data set or file and sets up a ddname. In the following example,
the //INMVS statement refers to the input data set, and the //OUTHFS
statement refers to the output file:
//TEST JOB MSGLEVEL=(1,1)
//COPYSTEP EXEC PGM=IKJEFT01
//INMVS DD DSN=TURBO.WORKLOAD.TOTALS(OCT17),DISP=SHR
//OUTHFS DD PATH='/u/turbo/wkld/totals/oct17',
// PATHDISP=(KEEP,DELETE),
// PATHOPTS=(OWRONLY,OCREAT,OEXCL),PATHMODE=(SIRUSR,SIWUSR)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
OCOPY INDD(INMVS) OUTDD(OUTHFS) TEXT CONVERT(YES) PATHOPTS(USE)
/*
In this example: - IKJEFT01 is the name of the Terminal Monitor Program (TMP), which needs to be started to process the TSO/E OCOPY command.
- For CONVERT(YES), the default is TO1047 when you are copying from an MVS™ data set to a file.
- PATHOPTS(USE) indicates that TURBO wants to use the PATHOPTS specified on the ALLOCATE command.
For more information about:
- The OPUT and OCOPY commands, see z/OS UNIX System Services Command Reference.
- The ALLOCATE command, see z/OS TSO/E Command Reference.
- The FREE command, see z/OS TSO/E Command Reference.
- The JCL, see z/OS MVS JCL Reference.