This general macro synchronizes a real-time or general tape. Tape
synchronization ensures that the position of the tape, as detected by the
device, is the same as detected by the application. This eliminates any
discrepancies introduced by buffering; either logical (that is, tapes
mounted in blocked mode) or physical (that is, tapes mounted on a device
operating in buffered mode).
Format
- label
- A symbolic name can be assigned to the macro statement.
- NAME
- Specifies the symbolic general or real-time tape name. It can
be:
- ccc
- A 3-character string representing a symbolic general or real time tape
name. The first 2 characters must be alphabetic, and the third
character must be alphabetic or numeric.
- (Rn)
- The number of a register containing a pointer to the symbolic real-time
tape name. n must be a decimal number from 0 to 7, 14 or
15.
- AUTO=NO|YES
- An optional keyword parameter may be specified indicating whether a tape
switch is to occur on a synchronize error. If specified, this parameter
must be coded as YES if tape switch is to occur or as NO if tape switch is not
to occur. If the tape is blocked, this parameter is forced to YES, even
if it was coded as NO or omitted. If the tape is not blocked and the
parameter is omitted, a default of NO is assumed.
The following macro format is still supported:
- label
- A symbolic name can be assigned to the macro statement.
- name
- A 3-character symbolic tape name must be specified as the first
parameter.
- AUTO=NO|YES
- An optional keyword parameter may be specified indicating whether a tape
switch is to occur on a synchronize error. If specified, this parameter
must be coded as YES if tape switch is to occur or as NO if tape switch is not
to occur. If the tape is blocked, this parameter is forced to YES, even
if it was coded as NO or omitted. If the tape is not blocked and the
parameter is omitted, a default of NO is assumed.
Entry Requirements
- R9 must contain the address of the ECB being processed.
- If the symbolic tape name specified by this macro is that of a general
tape, that tape must be open when this macro is issued.
Return Conditions
- Control is returned to the next sequential instruction.
- The contents of R14 and R15 are unknown. The contents of all other
registers are preserved across this macro call.
- The status of the synchronize operation is unknown.
Programming Considerations
- This macro can be executed on any I-stream.
- Both keyword and positional parameters may be used in the same macro
call. This practice is not recommended.
- To ensure completion of the synchronization operation, a WAITC macro
should be coded after this macro.
- If the tape is a blocked tape, the logical buffer is first synchronized by
issuing a write command to write out any data contained in the logical
buffer.
- Note:
- If the device is not capable of operating in buffered mode, the synchronize
command code (X'43') is converted to a NOP command code
(X'03').
- Synchronization is simulated for a nonbuffered device by issuing an NOP
command.
- Upon successful completion of the synchronization operation both the
logical buffer and the physical buffer (if any) are empty.
- If the synchronization fails and a tape switch occurs, the records are
recovered from the buffer and written to the new active tape. If the
synchronization fails and a tape switch does not occur, the records are placed
on top of the module queue.
- If there is a possibility of the ECB having outstanding DASD I/O, a WAITC
macro should be coded before the TSYNC macro to ensure that the TSYNC macro
will signal tape errors only.
- If this macro is issued prior to the end of tape restart, the ECB is
exited and a system error issued.
Examples
None.