This section provides an overview of the Troubleshooting command TAPECOPY.
The TAPECOPY command is a utility tool that you can use to select a specified subset or all records from an input data set, and copy them to an output data set. The selection logic is identical to that used for the DUMP command.
>>-+----------------+--TAPECOPY---------------------------------> '-tape copy name-' >--(--+-EXEC--(--INPUTDD--)--------+--)------------------------>< | .-4-------. | +-OFFSET--(--+-integer-+--)--+ +-CODES--(--codelist--)------+ | .-0-------. | +-SKIP--(--+-integer-+--)----+ | .-0-------. | +-STOPAFT--(--+-integer-+--)-+ '-NEWCOPY--(--ddname--)------'
Ensure that the specified name is not the same as a OMEGAMON® XE for DB2® PE command keyword or abbreviation.
Each entry must be separated by a comma. Enclose the code list in quotes if more than one value is specified.
If this option is omitted, all record codes (00-FF) are processed.
The default is 0. If 0 is specified, processing begins with the first record.
The default is 0. This causes all records (after skipping, if specified) to be processed.
In this example:
COPYSTAT TAPECOPY(
EXEC (INPUTDD)
OFFSET (4)
CODES ('01,02')
SKIP (50)
STOPAFT (10)
NEWCOPY (OUTDATA))
The following figure shows a sample JCL for the DUMP and TAPECOPY commands.
//TPCDUMP1 JOB (INSTALLATION DEPENDENCIES) //* //* //***************************************************************** //* //* COPY INPUT DATA FILE TO SYSPRINT OR AN OUTPUT DATA FILE //* //***************************************************************** //* // PEMAIN EXEC PGM=FPECMAIN //STEPLIB DD DSN=FPE.FPELIB.RKANMOD,DISP=SHR //SYSPRINT DD SYSOUT=X //SYSOUT DD SYSOUT=X //* //* --- INPUT DATA SET --- //* //INPUTDD DD DSN=FPE.FPELIB.INPUT1,DISP=SHR //* //* --- OUTPUT DATA SET --- //* //OUTDATA DD DSN=FPE.FPELIB.OUTPUT1, // DISP=(NEW,CATLG), // UNIT=SYSDA,SPACE=(TRK,(10,10),RLSE), // DCB=(RECFM=VB,LRECL=4092,BLKSIZE=4096) //* //SYSIN DD * * * --- TAPECOPY COMMAND EXAMPLE --- * COPY0001 TAPECOPY (EXEC(INPUTDD),SKIP(125),STOPAFT(10),NEWCOPY(OUTDATA)) * * * --- DUMP COMMAND EXAMPLE --- * DUMP0001 DUMP (EXEC(INPUTDD),SKIP(125),STOPAFT(10),MAXDUMP(1000)) EXEC * *