Use this file- or record-level keyword to explicitly inform the remote program that your program is done sending data and wants to end the transaction.
This keyword has no parameters.
The DETACH keyword must have an option indicator when it applies to a record for which any of the following keywords apply:
ALWWRT
ENDGRP
FMH
FRCDTA
INVITE
SUBDEV
At run time, these keywords are ignored when the DETACH keyword is in effect. If a DETACH keyword with no option indicator applies to a record for which any of these keywords apply, error messages are issued and these keywords are ignored at creation time.
The DETACH keyword is ignored at run time when EOS, RSPCONFIRM, or RQSWRT is in effect. These keywords must have option indicators when they apply to a record for which the DETACH keyword applies. If an EOS, RSPCONFIRM, or RQSWRT keyword with no option indicator applies to a record for which DETACH applies, an error message is issued and the DETACH keyword is ignored at creation time.
You cannot specify DETACH with the TIMER keyword.
At most, the DETACH keyword can be specified once at the file level or once per record format.
Option indicators are valid for this keyword.
The following example shows how to specify the DETACH keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R RCD 00020A 01 DETACH A
If option indicator 01 is on, the transaction between your program and the remote program will be ended.