TV (Tape to VSAM)
- Purpose
- Copy tape records to a VSAM data set.
- Usage notes
- Use this function to copy all or selected tape records to a VSAM
data set. You can also use this function to convert a multiple file
tape into a single VSAM ESDS (tape image file), which can be distributed
across a network. For more information, see Copying tape data across a network.
Specify a number of files other than one, but no tape file ID or start position. File Manager converts tape marks into special records containing “FILEMTMFILEMTM…”. When restoring the file to tape using the VT (VSAM to Tape) function, File Manager converts the special records back into tape marks. The resulting tape is an exact copy of the original tape.
Specify a DDNAME for the tape.
- Options
- You can specify the record format and the record length of the input data, and the position of the first record to copy. You can also specify the number of records to be copied, and whether any existing records in the output data set are to be replaced.
- Related functions
-
- DSC
- Copy a data set to another one
- TS
- Copy tape data to a data set
- VT
- Copy a VSAM data set to tape
- ddname
- Refers to a DD or TSO ALLOC statement. The default is VSAMOUT for output.
- dsname
- Name of a VSAM data set.
- LABEL=BLP
- Specifies that bypass label processing is used. This parameter must be specified with the first File Manager function that uses the tape. For BLP processing requirements, see “Customizing the Security Environment” in the File Manager for z/OS Customization Guide.
- nfiles
- Number of tape files to be copied. The maximum is 99 999;
the default is 1.
- EOV
- Copies files until a double tape mark or an EOV label is reached.
- EOD
- Copies files until the delimiter specified in the EOD parameter of the SET function is reached.
Use this parameter to copy a multifile tape, including tape marks, to a single VSAM entry-sequenced data set. (You can use the VT function to copy the VSAM file back to tape, including the tape marks.) For more information, see Copying tape data across a network.
- nlrecs
- Number of records to be copied or ALL. The maximum number is 99 999 999. If you specify ALL or omit the parameter, all the remaining records are copied.
- recfmin
- Record format for the input. Each value is a combination of the
following letters:
- B
- Blocked
- D
- Variable-length ISO/ANSI tape records
- F
- Fixed length
- S
- Spanned format
- U
- Undefined length
- V
- Variable length
- recsize
- Length of the input records, if recfmin is F or FB. If recfmin is F, the length of the first record is used by default. If recfmin is FB, recsize is required.
- reuse
- Specify YES to replace any existing records in the output data set (if it is defined with the REUSE parameter in the catalog). Specify NO to add new records without deleting the old records. The default is NO.
- skip
- Number of logical records to be skipped. The default is 0.
/* REXX */
/* copy a tape file to a vsam data set */
/* allocate input tape */
/* use SL processing. required file is at */
/* position 1 */
"ALLOC FILE(TAPE) DA('FMNUSER.TAPEIN')",
"VOLUME(FMO001) UNIT(CART) LABEL(SL)",
"POSITION(1) OLD"
/* copy a tape file to a vsam data set */
"FILEMGR $TV INPUT=TAPE,",
"DSNOUT=VSAM.DISK.VT55.DATA"
/* free the tape unit */
"FREE FILE(TAPE)"
return