Example: Using ALLOCATE and OCOPY
Using the ALLOCATE command to associate each data set with a ddname,
user TURBO could enter:
ALLOCATE DDNAME(TMP1) DSNAME(TEMP1) SHR
ALLOCATE DDNAME(TMP1OC) DSNAME(TEMP1OC) OLDwhere the DDNAME
keyword specifies the ddname. SHR indicates that this is an existing
data set and others can access it while the system is reading from
it. OLD indicates that this is an existing data set and others cannot
access the data set while the system is writing to it.TURBO could then enter the OCOPY command, using the ddnames from
the ALLOCATE command, to convert the data in TEMP1 from the MVS™ country-extended code page to
code page IBM-1047, and copy it to the data set TEMP1OC:
OCOPY INDD(TMP1) OUTDD(TMP1OC) TEXT CONVERT(YES) TO1047If
CONVERT is specified, you must also specify TO1047 or FROM1047.