Copy a DBCS Data Set: Example 5
In this example, the REPRO command is used with the DBCS and INSERTSHIFT
parameters. The REPRO command copies the input data set to the output
data set inserting SO and SI characters into each logical record of
the output data set. It is assumed that the input data set's logical
records contain DBCS characters and have an LRECL, for this example,
of 100 bytes and the record format is fixed length records.
//REPRO JOB ...
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//OUTDS DD DSN=MY.DATA,DISP=(NEW,CATLG),VOL=SER=VSER01,
// UNIT=3380,DCB=(LRECL=104,RECFM=F),SPACE=(TRK,(20,10))
//SYSIN DD *
REPRO -
INDATASET(USER.REPRO.EXAMPLE) -
OUTFILE(OUTDS) -
DBCS -
INSERTSHIFT((11 30)(51 60))
/*
The parameters are:
- INDATASET specifies the name of USER.REPRO.EXAMPLE the data set to be copied. This data set might not contain SO and SI characters.
- OUTFILE specifies the name of the output data set, MY.DATA. This data set will have SO and SI characters inserted. Because four shift characters are being inserted, the LRECL must be 4 bytes larger than the input data set's LRECL.
- DBCS specifies that the data contains DBCS characters and should be criteria checked.
- INSERTSHIFT specifies that a SO character is inserted before offsets 11 and 51 of the logical record and a SI character is inserted after offsets 30 and 60 of the logical record.