TS (Tape to Sequential Data)

Purpose
Copy tape records to a sequential data set.
Usage notes
Use this function to copy all or selected data from a tape file to a sequential data set on disk, on tape, or SYSOUT. You can also use this function to convert a multiple file tape into a single sequential data set (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 ST (Sequential Data 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.

If you want to use allocation parameters that are not supported by File Manager, you must use the TSO ALLOCATE command to allocate the data set out of File Manager with the file name QSAMOUT.

Options
You can specify the record format and the record length of the input data. You can also specify the record format and the block size of the output, and the number of records to copy.
Related functions
ST
Copy a data set to tape
TV
Copy tape data to a VSAM data set
Figure 1. Syntax

1 TS? LABEL=BLP INPUT=ddname
1! RECFMIN=U
1 RECFMIN=recfmin
2? RECSIZE=recsize
1! POSITION=0
1 POSITION=skip
1! NLRECS=ALL
1 NLRECS=nlrecs
1! NFILES=1
1 NFILES=nfiles
1! OUTPUT=QSAMOUT
1 OUTPUT=ddname
1 DSNOUT=dsname?(member) %Output data set parameters
6? RECFMOUT=recfmout
6? BLKSIZE=blksize
Output data set parameters

1? VOLSEROUT=volser? UNITOUT=unit
1! DISP=NEW
1 DISP=disp
2? SPACE=space
blksize
The maximum length of an output block in bytes. Specify it to change the block size of an old data set, or to override any system default for a new data set.
ddname
Refers to a DD or TSO ALLOC statement. The default is QSAMOUT for output.
disp
Disposition of the output data set. Specify OLD, MOD, NEW, or CAT for NEW,CATLG. The default is NEW.
Note: SMS might modify the allocation of new data sets on your system. For details, contact your SMS Administrator.
dsname
Defines the name of the data set. If any DD statements are specified, they are not used. The name may include a member name in parenthesis. If the member is specified here, the associated Member parameter must be empty. To further describe the data set, use the appropriate keywords as shown in the syntax diagram.
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.
member
For a PDS, the member name.
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 sequential data set. (You can use the ST function to copy the data set 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
The possible values are: U, F, FB, V, VB, VBS, VS, D, DB, DBS, and DS.
recfmout
Record format for the output. Each value is a combination of the following letters:
A
Containing ISO/ANSI control characters
B
Blocked
D
Variable-length ISO/ANSI tape records
F
Fixed length
M
Containing machine code control characters
S
Standard format (fixed length) or spanned format (variable length)
U
Undefined length
V
Variable length
The possible values are: U, UA, UM, F, FA, FM, FB, FBA, FBM, FBS, FBSA, FBSM, V, VA, VM, VB, VBA, VBM, VS, VSA, VSM, VBS, VBSA, VBSM, D, DA, DB, DBA, DS, DSA, DBS, and DBSA.

Use recfmout to override existing DCB information. You cannot create a PDS with a record format of FBS. If output data sets with a record format containing the letter D are written to disk, unpredictable results might occur.

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.
skip
Number of logical records to be skipped. The default is 0.
space
The number of space units to be allocated for a new data set. Specify n or (n,m), where n is the number of primary units, and m is the number of secondary units. The space unit is a track.
tapevol
Serial number (external label or VOL1) of the tape volume to be mounted.
unit
A device number. A 3 hexadecimal digit device number, a 4 hexadecimal digit device number prefixed by a slash (/), a device type, or an installation-defined group name.
volser
Volume serial number for a new or non-cataloged data set.
//TS  JOB (acct),'name'  Create Tape Image File
//*
//FMBAT    PROC
//FMBAT    EXEC PGM=FILEMGR
//STEPLIB  DD DSN=FMN.SFMNMOD1,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSABEND DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//         PEND
//*
//FILEMGR  EXEC FMBAT
//SYSPRINT DD SYSOUT=*
//TAPE     DD UNIT=(561,,DEFER),VOL=SER=FMO001,
//            DISP=SHR,LABEL=(,BLP)
//XMIT     DD DSN=FMNUSER.TAPE.XMIT.WORK,
//            DISP=(,CATLG),
//            UNIT=SYSALLDA,
//            SPACE=(CYL,(1,1),RLSE),
//            VOL=SER=MVS1T3
//SYSIN    DD *
$$FILEM TS  INPUT=TAPE,LABEL=BLP,
$$FILEM     OUTPUT=XMIT,NFILES=EOV
$$FILEM EOJ
/*