Copying Part of a Data Set

You can copy specific records from one sequential data set or member to another. Using the SMCOPY command, specify:
  • The FDS and TDS operands, as shown above.
  • The LINE operand with the range of records to be copied enclosed in parentheses. Specify a starting record and an ending record.
Example
To copy the first five records of text from the member MEM1 of PREFIX.PDS1.DATA to MEM2 of PREFIX.PDS2.DATA, specify:
SMCOPY FDS(pds1.data(mem1)) LINE(1:5) TDS(pds2.data(mem2)) NOTRANS

You cannot use the LINE operand to copy specific line numbers within a numbered data set. The system treats the numbers you specify as offsets from the beginning of the data set.

For more information about the SMCOPY command, see Session Manager and z/OS TSO/E Command Reference.