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
Read syntax diagramSkip visual syntax diagram
Syntax

>>-ST----------------------------------------------------------->

   .-INPUT=QSAMIN--------------------------------------------------.   
>--+---------------------------------------------------------------+-->
   +-INPUT=ddname--------------------------------------------------+   
   '-DSNIN=dsname-+----------+-+-----------------+-+-------------+-'   
                  '-(member)-' '-VOLSERIN=volser-' '-UNITIN=unit-'     

   .-POSITION=0----.  .-NLRECS=ALL----.                  
>--+---------------+--+---------------+--+-----------+---------->
   '-POSITION=skip-'  '-NLRECS=nlrecs-'  '-LABEL=BLP-'   

                               .-RECFMOUT=U--------.   
>--OUTPUT=ddname--+---------+--+-------------------+------------>
                  '-DENS=mm-'  '-RECFMOUT=recfmout-'   

>--+-----------------+-----------------------------------------><
   '-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 Z Data Tools function that uses the tape. For BLP processing requirements, see “Customizing the Security Environment” in the Z Data Tools 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
//*
//HFMBAT    PROC
//HFMBAT    EXEC PGM=HFMMAIN
//STEPLIB  DD DSN=HFM.SHFMMOD1,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=HFMUSER.BS43FB
//*
//STP1001  EXEC HFMBAT
//QSAMOUT  DD DISP=(,CATLG),UNIT=SYSALLDA,
//            SPACE=(CYL,(1,1),RLSE),
//            RECFM=FBS,DSN=HFMUSER.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
/*