This is IBM doc for the AWSMOUNT command on the P/390 and containing the specifications for the format of AWS virtual tapes. ================================== AWSTAPE emulates a 3803/3420 & 3422 tapes using a OS/2 disk file. The file can reside on either disk or diskette, which can be formatted for either the HPFS or FAT file system. Unlike P/390 DASD files, the configurator does not preallocate tape files. The AWSTAPE device manager automatically creates them when the S/390 operating system writes data to the device. DEVICE TYPE: 3420 or 3422 (Control unit 3803) ============ CONFIGURING a 3420 or 3422 ========================== To configure a 3420 or 3422 emulated tape, go to the Configurator F2 "UPDATE SYSTEM DEVICES" menu and enter the real address of a 3420 or 3422 tape device in the Addr field, the MGR code for AWSTAPE in the Mgr field, and a fully qualified OS/2 filename in the FN/P field. For example: Addr Device Mgr FN/P ------------------------------------------------------------------ >580 >3422 >E >C:\TAPE\IPLDDR.580 Note: VM/ESA 2.1 or above requires the tape to be specified as 3422 in DEVMAP. Otherwise you must use the CP SET RDEV to change the device characteristics to 3422 before varying the tape online. A maximum of 15 awstape devices can be define when they are in a contiguous address range. Fewer devices can be defined in discontigous ranges. The low order byte of the unit address of any tapes defined must be unique: You cannot have a 583 and 593 both as awstape devices. THE OS/2 AWSMOUNT COMMAND ========================= You can use the OS/2 AWSMOUNT command to change the filename that is associated with the emulated tape or to issue Rewind and Rewind Unload commands. See AWSMOUNT.DOC or enter AWSMOUNT ? from an OS/2 prompt. THE VM MOUNT COMMAND ==================== To change the filename while VM is running, use the CMS MOUNT command. Attach the tape to your userid and issue the mount command: MOUNT 181 (QUERY to display the name of the current tape file MOUNT 181 (STACK to put the name of the current file on the stack MOUNT 181 pcfilename to change the name Enter HELP MOUNT from a P/390 CMS session for additional information. THE VSE TMOUNT COMMAND ====================== The TMOUNT command is a program that can be executed in a VSE/ESA batch partition to either query the existing filename or mount a new emulated tape or disk. The TMOUNT program is supplied on the VSE/ESA Starter System CD-ROM. It can be installed onto the VSE/ESA system by copying the member to the OS/2 directory set up by you for the emulated 2540 card reader and starting a VSE/POWER reader task to that device. The JCL required to use the TMOUNT program to query the existing file is: // ASSGN SYS004,581 // EXEC TMOUNT,SIZE=AUTO,PARM='581 (QUERY' The above example assumes an emulated tape drive at address 581. The JCL required to use the TMOUNT program to mount a new file is: // ASSGN SYS004,581 // EXEC TMOUNT,SIZE=AUTO,PARM='581 D:\VSE\MYTAPE.581' The above example assumes an emulated tape drive at address 581. The filename parameter is limited to 17 characters maximum. SPECIAL EMULATION CONSIDERATIONS ================================ The PC file is opened when data is read or written to the tape, or when tape positioning commands like FORWARD SPACE FILE or FORWARD SPACE RECORD are issued. The PC file is closed when a REWIND or REWIND UNLOAD is issued. If the PC file has the read/only attribute set, it appears as read only (no ring) to the P/390. If the file is on a diskette, be sure to rewind or DETACH the tape before removing the diskette. This insures that all the information has been written and the file is closed. Rewind Unload ------------- A REWIND UNLOAD command does not actually unload or demount the tape. It sets the sense bits so that a SENSE command reports 'intervention required', as do READ or WRITE commands. However, if you issue other tape commands such as REWIND or FSF, they succeed. The tape status is reset, and subsequent WRITE or READ commands proceed normally. This difference from real 3420 operation means that a tape can be detached from one userid and reattached for immediate reuse by another userid. Re-writing a tape ----------------- When data is written to the middle of an emulated tape, any data following it is erased. The PC file representing the tape is truncated. This allows the file to grow and shrink as the 'tape' is reused. Thus, programs that depend on the ability to rewrite records or files on a tape will do not work with the P/390 3420 tape emulator. Read Backwards -------------- The P/390 I/O subsystem does not support the READ BACKWARDS CCW unless the SKIP bit is on. This may affect certain tape utility programs. It applies to all tapes, whether emulated, SCSI-attached, or Bus & Tag Channel-attached. ERRORS ====== The most common error is 'equipment check', which is set if the file mounted is not in AWSTAPE format. In other words, you probably mounted the wrong file. If that's not the case, then the file has been damaged and cannot be used with AWSTAPE. PC TAPE FILE FORMAT =================== This section defines the format of the PC file created by the 3420 emulator. You do not need to read further unless you need to understand details about how the file is structured. The tape file consists of a series blocks. Each block begins with a 6 byte header followed by a (possibly null) data block. The header block specifies the length of the data block. Currently, data blocks must not be longer than 4096 bytes. These data blocks are not the same as 'tape' records. The header is defined as follows: DCL 1 T_Header, 2 t_size fixed(16), /* Size of the following block */ 2 t_psize fixed(16), /* Size of the previous block */ 2 t_flags, /* Control flags. */ 3 t_Newrec bit, /* start of new record */ 3 t_eof bit, /* end-of-file mark */ 3 t_Endrec bit, /* End of a record */ 3 * bit, /* Must be zero */ 3 * bit, /* Reserved */ 3 reserved bit(11); /* Must be zero */ T_Size and T_PSize are two byte integers in PC format. They currently must be less than or equal to 4096 bytes (this is the maximum size currently supported. Don't depend on it not getting larger). Because tape records can be longer than 4096, T_Newrec and T_Endrec define the mapping of these internal tape blocks to emulated tape records. If both Newrec and Endrec are on, the record is entirely within one block -- it is t_size bytes long. If a record is longer than one block but fits in two blocks, then the first has T_Newrec set, and the second has T_endrec set. If the record is three blocks or longer, the middle blocks have both newrec and endrec turned off. T_EOF is set for a filemark; if it is on, Newrec and Endrec should be off and T_size should be zero. An EOF block should be followed by header block, or another eof block, or it should be at the end of the file. T_size and T_Psize do not include the length of the header block. Thus, the first block on the tape has T-Psize = 0. An EOF block has T_size equal to zero, and the second of two EOF blocks in a row has both T_size and T_Psize = 0