BT (Create Tape File)

Purpose
Write test data to a tape file.
Usage notes
Use this function to format a tape or create test data.

Specify a DDNAME for the tape. Also specify the record size and the number of records to be written.

Options
You can specify a fill character or fill pattern, a sequence field, a record format, and a block size.
Related functions
DSG
Write test data to a data set
INT
Initialize a tape
Figure 1. Syntax

1 BT? LABEL=BLP OUTPUT=ddname? DENS=mm NLRECS=nlrecs RECSIZE=recsize? FILLCHAR=fillchar? KEYLOC=keyloc
2.1! KEYLEN=8
2.1 KEYLEN=keylen
2.1! INCR=10
2.1 INCR=incr
1! RECFMOUT=U
1 RECFMOUT=recfmout
2? 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. To create a tape file with standard labels, specify AL or SL processing on the DD or TSO ALLOC statement.
fillchar
To fill each byte of each record with data, specify one of the following:
char
A character, such as 0 to be written in each byte
X'cc'
A binary character, such as X'04' to be written in each byte
AN
To write alphanumeric characters (A to Z and 0 to 9)
BIN
To write binary characters (X'00' to X'FF')
RAND
To write random binary characters (X'00' to X'FF')
If you specify AN or BIN, characters are written in a “ripple” pattern. For example, if you specify AN, the first 3 records look like this:
  ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789A
  BCDEFGHIJKLMNOPQRSTUVWXYZ0123456789AB
  CDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABC

The default is a blank.

incr
Increment value for the sequence field. The default is 10.
keylen
Length of the sequence field, from 1 to 9. The default is 8.
keyloc
Position (starting with 1) of the sequence field within the output records. If omitted, there is no sequence field.
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.
mm
A 2-byte tape mode as shown in Tape density and mode values.
nlrecs
Number of logical records to be written. The maximum is 99 999 999.
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.
recsize
Length of each logical record. The maximum is 9 999 999.
//BT  JOB (acct),'name'     Create 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
//*
//*  EXAMPLE BT JOB, SL processing
//*  67 RECORDS ARE WRITTEN TO A TAPE FILE,
//*  V RECFM.  THE OUTPUT FILE CONTAINS
//*  ALPHANUMERIC CHARACTERS.  THERE IS A
//*  SEQUENCE FIELD AT POSITION 1.
//*
//STP0001     EXEC FMBAT
//BT1      DD DISP=(NEW,KEEP),UNIT=CART,
//            VOL=(,RETAIN,,,SER=FMO001),
//            LABEL=(1,SL),
//            DSN=FMNUSER.BT05.A1V
//SYSIN    DD *
$$FILEM BT  OUTPUT=BT1,NLRECS=67,RECSIZE=1024,
$$FILEM     KEYLOC=1,RECFMOUT=V,FILLCHAR=AN
$$FILEM EOJ
/*
//*
//*  12 RECORDS ARE WRITTEN TO A TAPE FILE,
//*  FB RECFM.  THE OUTPUT FILE CONTAINS '*'
//*  CHARACTERS.  THERE IS A SEQUENCE FIELD
//*  AT POSITION 10.
//*
//STP0002     EXEC FMBAT
//BT2      DD DISP=(NEW,KEEP),UNIT=CART,
//            VOL=(,RETAIN,,,SER=FMO001),
//            LABEL=(2,SL),
//            DSN=FMNUSER.BT05.A2FB
//SYSIN    DD *
$$FILEM BT  OUTPUT=BT2,NLRECS=12,RECSIZE=2048,
$$FILEM     KEYLOC=10,INCR=100,
$$FILEM     RECFMOUT=FB,FILLCHAR='*',
$$FILEM     BLKSIZE=20480
$$FILEM EOJ
/*