ST (Sequential Data to Tape)

Purpose
Copy records from a sequential data set to a tape file.
Usage notes
Use this function to copy records from a sequential data set to an unlabeled tape.

Unless you have strong reasons for not doing so, use bypass label processing (BLP) with this function.

Specify a DDNAME for the tape.

Options
You can specify the number of records to skip from the beginning of the input data set. You can also specify the number of records to copy, and the output record format and block size.
Related functions
DSC
Copy a data set to another one
TLT
Copy multivolume, multiple-file labeled tapes
TS
Copy tape data to a data set
Figure 1. Syntax

1 ST
1! INPUT=QSAMIN
1 INPUT=ddname
1 DSNIN=dsname?(member)?VOLSERIN=volser?UNITIN=unit
1! POSITION=0
1 POSITION=skip
1! NLRECS=ALL
1 NLRECS=nlrecs
4? LABEL=BLP
4 OUTPUT=ddname
4? DENS=mm
1! RECFMOUT=U
1 RECFMOUT=recfmout
5? BLKSIZE=blksize
blksize
If recfmout contains F, the actual block size; otherwise, the maximum block size. If recfmout contains B or S, blksize is required; otherwise, it is optional. The maximum is 65 535 (for V), 9 999 (for D), or 9 999 999 (otherwise). If the tape is processed by other utilities or standard access methods, you must also consider the operating system limits.
ddname
Refers to a DD or TSO ALLOC statement. The default is QSAMIN for input. To create the output tape file with standard labels, specify AL or SL processing on the DD or TSO ALLOC statement.
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.
mm
A 2-byte tape mode as shown in Tape density and mode values.
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.
recfmout
Record format for the output. 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.
skip
Number of logical records to be skipped from the beginning of the data set. The default is 0.
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 non-cataloged data set.
//ST  JOB (acct),'name'
//* Copy Sequential file to SL Tape
//*
//FMBAT    PROC
//FMBAT    EXEC PGM=FILEMGR
//STEPLIB  DD DSN=FMN.SFMNMOD1,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSABEND DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//         PEND
//*
//DELETE   EXEC PGM=IEFBR14
//BSA1     DD DISP=(MOD,DELETE),UNIT=SYSALLDA,
//            SPACE=(TRK,(1,1),RLSE),
//            DSN=FMNUSER.BS43FB
//*
//STP1001  EXEC FMBAT
//QSAMOUT  DD DISP=(,CATLG),UNIT=SYSALLDA,
//            SPACE=(CYL,(1,1),RLSE),
//            RECFM=FBS,DSN=FMNUSER.BS43FB
//OUTTAPE  DD DSN=TDALAIS.TAPEOUT,UNIT=CART,
//            DISP=(,KEEP),LABEL=(2,SL),
//            VOL=(,RETAIN,,,SER=FMO001)
//SYSIN    DD *
$$FILEM VER
$$FILEM DSG OUTPUT=QSAMOUT,NLRECS=5677,
$$FILEM     RECSIZE=800,KEYLOC=1,KEYLEN=5,
$$FILEM     INCR=5,RECFMOUT=FB,FILLCHAR=AN
$$FILEM ST  INPUT=QSAMOUT,OUTPUT=OUTTAPE,
$$FILEM     RECFMOUT=VB,BLKSIZE=6000
$$FILEM EOJ
/*