IBMTAPE USER GUIDE ------------------ Author: Alex Wong,1994,Melbourne,Australia INTRODUCTION ------------ The utility program IBMTAPE provides the following functions for the user: - READ an IBM (EBCDIC) tape, labelled or unlabelled and create an ASCII file. - WRITE an IBM (EBCDIC) tape, labelled or unlabelled from an ASCII disk file. The contents of a labelled tape consists of: VOLID HDR1 HDR2 tm DATA_BLOCKS tm EOF1 EOF2 tm tm An unlabelled tape consists of: DATA_BLOCKS tm tm Currently, IBMTAPE handles single file, single volume tapes with fixed-length records and blocks. You must mount the tape device before running IBMTAPE or else you will get a "NO PRIVILEGE" message. READ AN IBM TAPE ---------------- When you run IBMTAPE and select the READ function, IBMTAPE automatically checks the first block on the tape. If a VOLID label is found, it proceeds to process the tape as a labelled tape. If not, it assumes the tape is unlabelled and processes it as such. LABELLED TAPE ------------- An IBM labelled tape contains information in the header records which are used to open a new disk file. The volume label,record and block sizes are extracted from the headers. The disk file name must be entered by the user as the filename from the tape label may be in IBM format and not be suitable as a VAX file name. The file created is an ASCII sequential file with fixed length records. $ MOUNT/FOREIGN MUC0: $ RUN UTIL_EXE_DIR:IBMTAPE R(ead) or W(rite) IBM tape? [EXIT]: R Tape device name: MUC0: Output file name: SEC123.DAT !user-entered Volume label: STELCO !displayed from headers Record size : 63 !displayed from headers Block size : 6300 !displayed from headers Total records processed: 130 Total blocks processed: 2 $ DISMOUNT MUC0: UNLABELLED TAPE --------------- An IBM unlabelled tape contains only data blocks terminated by 2 tape (eof) marks. Since no header records are available, you must supply the file name, record size and block size before IBMTAPE can create the disk file. The default file name provided is IBMTAPE.DAT. $ MOUNT/FOREIGN MUC0: $ RUN UTIL_EXE_DIR:IBMTAPE R(ead) or W(rite) IBM tape? [EXIT]: R Tape device name: MUC0: File name [IBMTAPE.DAT]: PAYFEB.DAT !entered by user Record size : 524 !entered by user Block size : 5240 !entered by user Total records processed: 46 Total blocks processed: 5 $ DISMOUNT MUC0: WRITE AN IBM LABELLED TAPE -------------------------- To create a labelled tape, the volume label, record size and block size must be specified. The volume label defaults to the first 6 characters of the file name and may be changed. If a file contains variable length records, the length of the longest record will be displayed as the default record size for the tape. All other records will be blank-padded to this length before written to tape. If the disk file contains fixed-length records, then this fixed length will be used. If you change the record size to less than the default, the records will be truncated. If it is greater than the default, records will be blank padded. The block size defaults to 10 records and the maximum is 65534 bytes. The block size must be a multiple of the record size. $ MOUNT/FOREIGN MUC0: $ RUN UTIL_EXE_DIR:IBMTAPE R(ead) or W(rite) IBM tape? [EXIT]: W Tape device name: MUC0: Input file name : ROVPAY_DEC.DAT Volume label [ROVPAY]: MOTORV Record size [ 329]: Block size [ 3290]: 6580 !20 recs/block Total records processed: 256 Total blocks processed: 13 $ DISMOUNT MUC0: WRITE AN IBM UNLABELLED TAPE ---------------------------- To create an unlabelled tape, enter when prompted for the volume label. This indicates that no volume, header and trailer labels will be written to tape. The tape consists of data blocks terminated by 2 tape (eof) marks. If the file contains variable length records, the length of the longest record will be displayed as the default record size for the tape. All other records will be blank-padded to this length before written to tape. If the disk file contains fixed-length records, then this fixed length will be used. If you change the record size to less than the default, the records will be truncated. If it is greater than the default, records will be blank padded. The block size defaults to 10 records and the maximum is 65534 bytes. The block size must be a multiple of the record size. $ MOUNT/FOREIGN MUC0: $ RUN UTIL_EXE_DIR:IBMTAPE R(ead) or W(rite) IBM tape? [EXIT]: W Tape device name: MUC0: Input file name : SFIIGLPAT.JNL_HV8 Volume label [SFIIGL]: Record size [ 224]: Block size [ 2240]: Total records processed: 137 Total blocks processed: 14 $ DISMOUNT MUC0: