TWRTC: Write a general tape record

This general macro writes a record from a core block to the specified general tape. The block of storage containing the data record is detached from the entry control block (ECB) and returned to the appropriate pool.

Last updated

Changed for PUT02.

Format

Read syntax diagramSkip visual syntax diagramlabelTWRTCNAME=ccc( reg),LEVEL= level,DECB=decbaddr( reg2)
label
is a symbolic name can be assigned to the macro statement.
NAME
specifies the symbolic general tape name, where:
yyy
is a 3-character string representing a symbolic general tape name. The first 2 characters must be alphabetic and the third character must be alphabetic or numeric. For general tapes, the first 2 characters cannot be RT.
reg
is a register that contains a pointer to the symbolic real-time tape name.
LEVEL=level
specifies a symbolic data level, where level is a data level from D0 to DF.
DECB
specifies one of the following:
decbaddr
is a label that points to the data event control block (DECB), which contains the core block information for the I/O request.
reg2
is a general register (R0–R7) that contains the address of a DECB, which contains the core block information for the I/O request.
The following macro format is still supported:
Read syntax diagramSkip visual syntax diagramlabelTWRTCname,Dx
label
is a symbolic name that can be assigned to the macro statement.
name
is a symbolic general tape name that must be specified as the first parameter.
Dx
is a symbolic data level (D0–DF) that must be specified as the second parameter.

Entry requirements

  • R9 must contain the address of the ECB being processed.
  • A core block must be held by the ECB on the data level or the DECB specified by this macro.
  • The general tape specified by this macro 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 file address reference word (FARW) on the data level or DECB specified is unchanged.
  • The core block reference word (CBRW) on the data level or DECB is updated to indicate that the storage block is no longer held by the ECB.
  • When a condition such as End-of-Volume (EOV) or permanent error occurs, a tape switch will automatically occur. For the TWRTC macro, AUTO=YES is implied. (See TDCTC macro in z/TPF System Services or TSYNC: Synchronize tape for more information about the AUTO parameter).

Programming considerations

  • For information about macro register conventions, see Register conventions.
  • 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.
  • The control program checks to ensure that the ECB is holding a storage block on the data level or DECB specified by this macro and that the general tape name specified by this macro is open. If either condition is not met, control is transferred to the system error routine.
  • The status of the Write operation can never be determined by the operational program.
  • The operational program can use the requested data level or DECB specified by this macro immediately on return from the control program.
  • The contents of the entire storage block are written to tape.
  • When writing to an unblocked general tape mounted on a buffered device, the mode of operation (buffered or Tape Write Immediate) is determined by the setting of the tertiary status byte in the tape status table.
  • If the location of the DECB specified by the DECB parameter does not refer to a valid DECB, control is transferred to the system error routine.
  • Storage increases from 8 bytes to 10 or 12 bytes depending on whether a register or label is used to specify the DECB address.
  • If you issue the tape macros in a multithreaded environment, ensure that the macros are issued in the required sequence. See General tape operations for more information.

Examples

The following example shows the TWRTC macro with the DECB parameter specified. General register R0 contains the address of the DECB.
TWRTC NAME=ABC,DECB=(R0)           

Related information

See Tape macros for more information about using the tape macros.