gtps1m5n | System Macros |
Use this system macro to provide an interface to certain tape control program (CP) routines for entry control block (ECB)-controlled segments in the tape handling area. These routines allow the ECB routine to:
Required Authorizations | |||
---|---|---|---|
Key0 | Restricted | System | Common Storage |
| X |
|
|
Format
|
Notes:
The tape statuses for the QUIESCE function are:
When a tape is auxiliary queued, normal I/O requests are queued but no I/O is performed. Tape handling routines can force processing, however, by requesting a bypass of this suspension. An I/O request of this type is said to be a bypass auxiliary queue request.
The postinterrupt routines for the PURGE function are:
The option available with the ACTIVATE function is:
Entry Requirements
Return Conditions
Programming Considerations
Purge
Any I/O request for the specified device that is already in progress at the time the macro is issued will be allowed to complete. Any I/O requests for the specified device that are not already in progress will be ended without I/O initiation. After completion of any I/O operation already in progress, the ECB I/O counter will be decremented. No error indicators will be set.
The module queue is considered to have been successfully purged if no I/O requests have been added to the queue between the time the TPINC PURGE was issued and the time any I/O operation already in progress has completed. If the module queue has not been successfully purged, then the WAITC error branch will be taken.
If an uncorrectable hardware error occurs for the operation currently in progress, or if the device is not operational, then the hardware error indicator (CXSGHE) in the ECB gross error indicator byte will be set and the WAITC error branch will be taken.
Restart
Following normal completion of the I/O operation already in progress (or immediately if there is none), the auxiliary queued indicator in the Tape Status Table will be set off and the ECB I/O counter will be decremented. No error indicators will be set and the WAITC error branch will not be taken.
If an uncorrectable hardware error occurs for the operation currently in progress or if the device is not operational, then the hardware error indicator (CXSGHE) in the ECB gross error indicator byte will be set and the WAITC error branch will be taken.
Quiesce
For NORMAL or OFFLINE status, CE1TIN will be set to X'FF' (no auxiliary queue bypass). For AUXQ status, CE1TIN will be set to X'00' (auxiliary queue bypass).
For OFFLINE status the offline indicator in the tape status table will be set, preventing any further queuing of normal I/O requests for this module. However, that this will not inhibit I/O requests from auxiliary queue bypass macros using a tape name XXX. For AUXQ status the auxiliary queued indicator in the tape status table will be set. For NORMAL status the tape indicators will not be modified.
Following completion of all I/O requests (or, in the case of AUXQ status, following completion of all auxiliary queue bypass I/O requests) that were queued at the time the TPINC QUIESCE was issued, the ECB I/O counter will be decremented. No error indicators will be set.
The module queue is considered to have been successfully quiesced if no I/O requests have been added to the queue between the time the TPINC QUIESCE was issued and the time any I/O operation already in progress has completed. If the module queue has not been successfully quiesced, then the WAITC error branch will be taken.
If an uncorrectable hardware error occurs for any operation that was queued at the time the macro was issued or if the device is not operational, then the hardware error indicator (CSXGHE) in the ECB gross error indicator byte will be set and the WAITC error branch will be taken.
Switch
The status of the standby tape is checked. If a standby is not available or the status is found to be unsafe, a search is made for a suitable ALT tape. If an ALT tape is found, an attempt will be made to convert the ALT tape to a standby tape.
The available standby tape will become the active tape and I/O requests queued for the old active tape will now be queued for the new active tape. If no errors were encountered during the switch, processing continues at the next sequential instruction (NSI) with X'00' in R15. The ECB may then exit. The switch will continue, asynchronously.
If a standby tape could not be found and it was not possible to convert an ALT tape to a standby, processing continues at the next sequential instruction (NSI) with X'04' in R15.
If a TPINC SWITCH request is issued while there is DDR recovery in progress for the tape specified, processing continues at the next sequential instruction with X'08' in R15.
Mount
The status of the tape is checked. If there is a tape mounted on that device already, or if the tape status table entry has not been seized, then R15 will contain X'04' on return from the macro and no mount will be performed.
If there is not a tape already mounted, then X'00' will be returned in R15 and mount processing for that device will begin to mount an ALT tape. An ECB will be obtained and control transferred to the tape mount processing segments to complete the request. The final outcome of the request is unknown.
Findalt
The TLMR entry for the tape mounted on the device specified will be used to locate a suitable ALT tape to switch to.
If a suitable ALT tape was found, the module number will be returned in R14 and the TSTB section 1 address will be returned in R15. The TSTB2 entry will also be seized.
If no suitable tape was found, then R14 will contain X'00'.
Activate
This function will activate an ECB, currently on the tape wait-list. It begins by scanning the ECBs on the tape wait-list. If an ECB is found waiting for the tape name specified in EBTTNM, it is removed from the tape wait-list. An $ADPC macro is issued placing the ECB on the ready-list of the I-stream which originally placed it on the tape wait-list.
Getbuf
This function gets eight 4 KB blocks to make up the blocking buffer and saves the block addresses in the tape status table as well as in the buffer block table.
Relbuf
This function deletes the addresses of the eight 4 KB blocks for the block buffer from the block buffer table and the tape status table and returns them to the TPF system.
Examples