If the remote program does any of the following:
v Requests to end sending data
v Requests to end the transaction
v Requests to confirm receiving the data
v Sends a FAIL
this sets on one of the following response indicators:
v 01 (the RCVTRNRND keyword)
v 02 (the RCVDETACH keyword)
v 03 (the RCVCONFIRM keyword)
v 04 (the RCVFAIL keyword)
The EOS keyword causes the session to end if indicator 01 is on and the
program issues an output operation.
The AS/400 system sends and receives data in the form of header (record
format HEADER) and detail (record format DETAIL) records. If your
program is sending, option indicator 09 can be set on (enabling the
CONFIRM keyword) to request that the remote system confirms receiving
When receiving, the record selection processing (RECID keyword)
determines which record is received. If an H is in position 1, record format
HEADER is selected. If a D or E is in position 1, record format DETAIL is
selected. If anything else is in position 1, (unexpected record format,
application error, or indicators with no data, RCVDETACH, RCVFAIL, and
so on) record format CATCHALL is selected.
Record format, COMMANDS, is used to request the following
v If indicator 05 is on, the FAIL function is performed.
v If indicator 06 is on, the ALWWRT function is performed.
v If indicator 07 is on, the DETACH function is performed.
v If indicator 08 is on, the RQSWRT function is performed.
v If indicator 09 is on, the CONFIRM function is performed.
v If indicator 10 is on, the RSPCONFIRM function is performed.
Example Program Using a Physical, Display, and Printer File Using
The sample program shown in Figure 456 on page 594 illustrates the use of
externally described data in a program. This program uses the sample physical file,
display file, and printer file given in this appendix.
If you enter the DDS for these files on your system and create them using the
Create Physical File (CRTPF) command, the Create Display File (CRTDSPF)
command, and the Create Printer File (CRTPRTF) commands, this program allows
you to add records to the physical file, display and update the records, and print a
The program is written in RPG. You can enter the RPG specifications shown in
Figure 456 into a source file on your system and create the program using the
Appendix B. Examples of DDS for Each File Type