Copying data sets
When you are using File Manager under ISPF, you can use the Copy Utility (option 3.3) to copy data from one data set to another data set; when you are programming a batch job, REXX procedure or TSO clist, you can use the equivalent function, DSC (Data Set Copy). Whether you are using the panel or the function, the Copy Utility (option 3.3) lets you copy data using no templates, a “From” template only, or both “From” and “To” templates, in order of increasing flexibility.
You can also invoke the Copy Utility by issuing the COPY line command (or by selecting Copy from the Process pull-down menu) on the Data Set List panel, reached using the Catalog Services Utility (3.4). For more information, see Working with a list of catalog entries.
With or without templates, you can enhance File Manager copy processing by specifying a REXX procedure or DFSORT statements. Using a procedure potentially allows you greater flexibility than any of the choices listed here, but it involves the extra complexity of programming.
With or without templates, you can copy records where the input and output data sets have a different record format, record length, or block size.
You can use the Copy Utility to:
- Copy data from any supported data set to any other supported data
set. Concatenated like and unlike sequential data sets are
supported. Note that, under some conditions (with tape data sets), File Manager may not be able to detect unlike data set attributes and still
invoke DFSORT for copy processing. Such invocation may fail since DFSORT does not allow for unlike
concatenation of data sets. In such cases, the DFSORT use may be disabled with the NOSORT function
to allow for successful processing of concatenated data sets with unlike attributes.
Concatenated partitioned data sets with like attributes are fully supported. Mixed partitioned data sets with like and unlike attributes are processed correctly providing that the members being selected for processing come from libraries with matching attributes, otherwise errors may be reported.
- Select the records to be copied using the start key (VSAM only), skip and copy count fields, or a conditional expression defined in an input template.
- Change file attributes. You can copy records where the input and output data sets have differing record formats, record lengths or block sizes. The copy process truncates or pads records appropriately. To specify a pad character, use the PAD option on the Set System Processing Options panel (option 0.2).
- Copy selected fields, change the size of fields, and create new fields in the output file by using a “From” template with a “To” template.
- Generate data in external format.
- Allocate a non-VSAM data set, or define a VSAM data set.
- Copy sequential data sets or PDS or PDSE members, including member generations, converting the data to or from ISPF PACK data format.
- Your input and output data sets are PDS or PDSEs.
- Your TSO environment is active (and you can use the TSO authorized program services), or you are running File Manager as program-authorized.
- You have not specified a REXX or DFSORT user procedure.
- You have not specified Start key, Skip or Copy counts.
- You are not using templates.
- You do not request member record counts.