CL Command Reference - CRTTAPF
CL Command List > CRTTAPF Reference
Description:
The Create Tape File (CRTTAPF) command creates a tape device file. The device file contains the file description, which identifies the device to be used; it does not contain data. The tape device file is used to read and write records on tape. The same device file can be used for both input and output operations.
Note: This command is not used to create device files for use in save or restore operations. User-created device files are not needed for save or restore operations.
Tape files have no data description specifications (DDS). The information in the tape file description comes from the command that creates it. The tape file has one record format for input/output operations. The record format consists of one character field containing the input data retrieved from the device or the output data to be written to the device. The program using the device file must describe the fields in the record format so the program can arrange the data received from or sent to the device in the manner specified by the tape file description.
Examples:
Example 1: Creating a Description of a Tape Device File
CRTTAPF FILE(BACKHST) DEV(QTAPE1 QTAPE2 QTAPE3)
REELS(*BLP 10) RCDLEN(256) BLKLEN(1024)
RCDBLKFMT(*FB) EXTEND(*YES)
ENDOPT(*UNLOAD) WAITFILE(60)
This command creates a description of the tape device file named BACKHST in the current library, to be used with the tape devices QTAPE1, QTAPE2, and QTAPE3. All volumes processed on these devices with this device file must have standard-labels. Each block of data (EBCDIC character code) on the tape volumes contains four records of 256 bytes each. When records are written to the tape, they are added to the end of the data file. No creation or expiration date is specified for this tape, and both unloading and rewinding operations will occur when the device file is closed at the last tape volume processed. The program using this tape device file waits 60 seconds for file resources to be allocated when this file is opened, and this device file is used only when the current program is running.
Example 2: Creating a Tape File Containing DBCS Data
CRTTAPF FILE(IGCLIB/IGCTAP) LABEL(GENINF) IGCDTA(*YES)
This command creates the tape file IGCTAP that is stored in library IGCLIB, which is labeled GENINF, and contains DBCS data.