Example: An intersystem communications function file using DDS
This example contains data description specifications (DDS) for transmitting data between the IBM i platform and a remote system or device.
The following keywords are important in the example:
CONFIRM
DETACH EVOKE RCVDETACH RCVFAIL RCVCONFIRM RCVTRNRND |
RECID
SYNLVL EOS RSPCONFIRM ALWWRT FAIL RQSWRT |
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A*
00020A* SAMPLE ICF FILE
00030A*
00040A 01 (3) EOS
00050A (2) RCVTRNRND(01 'TRNRND INDICATION')
00060A (2) RCVDETACH(02 'DETACH RECEIVED')
00070A (2) RCVCONFIRM(03 'CONFIRM REQUEST')
00080A (2) RCVFAIL(04 'FAIL RECEIVED')
00090A
00100A R CATCHALL
00110A FLD1 132A
00120A*
00130A R SNDEVOKE EVOKE(&LIBNME/&PGMNME);
00140A (1) SYNLVL(*CONFIRM) SECURITY(2 PASSWRD)
00150A (1) CONFIRM
00160A PGMNME 10A P
00170A LIBNME 10A P
00180A PASSWRD 8A P
00190A*
00200A R HEADER RECID(1 'H')
A
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00210A 09 CONFIRM
00220A ID 1A
00230A (4) PART# 12A
00240A UNTCST 6S 2
00250A QTYONORDR 9B 0
00260A TOTAL 9B 0
00270A*
00280A R DETAIL RECID(1 'D') RECID(1 'E')
00290A 09 CONFIRM
00300A ID 1A
00310A (4) LOC 6A
00320A QTY 9B 0
00330A*
00340A R COMMANDS
00350A 05 (5) FALL
00360A 06 (5) ALWWRT
00370A 07 (5) DETACH
00380A 08 (5) RQSWRT
00390A 09 (5) CONFIRM
00400A 10 (5) RSPCONFIRM
A
Legend:
- (1)
- The record format SNDEVOKE causes the program specified in the field PGMNME and the library specified in the field LIBNME to be started on the remote system. It also establishes a synchronization level of *CONFIRM for the transaction and passes the data in the field PASSWRD as security information. The CONFIRM keyword requests that the remote system confirm the start of the program.
- (2)
- If the remote program performs any of the following actions:
- Requests to end sending data
- Requests to end the transaction
- Requests to confirm receiving the data
- Sends a FAIL
- 01 (the RCVTRNRND keyword)
- 02 (the RCVDETACH keyword)
- 03 (the RCVCONFIRM keyword)
- 04 (the RCVFAIL keyword)
- (3)
- The EOS keyword causes the session to end if indicator 01 is on and the program issues an output operation.
- (4)
- The system sends and receives data in the form of header
records (record format HEADER) and detail records (record format DETAIL).
If your program is sending, option indicator 09 can be set on, which
enables the CONFIRM keyword to request the remote system to confirm
receiving the data.
When receiving data, 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 an 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.
- (5)
- Record format, COMMANDS, is used to request the following communications
functions:
- If indicator 05 is on, the FAIL function is performed.
- If indicator 06 is on, the ALWWRT function is performed.
- If indicator 07 is on, the DETACH function is performed.
- If indicator 08 is on, the RQSWRT function is performed.
- If indicator 09 is on, the CONFIRM function is performed.
- If indicator 10 is on, the RSPCONFIRM function is performed.