User`s guide

3: BSC 3270 DLI Functions
DC 900-1340I 51
Caution
When using non-blocking I/O, a dlRead request must always be
queued to avoid loss of data or responses from the ICP (see Step 5
of Tab le 3– 2).
Table 3–2: DLI Call Sequence for BSC 3270 (Non-blocking I/O)
1. Call dlInit to initialize the DLI operating environment. The first parameter is your DLI
binary configuration file name.
2. Call dlOpen for each required session (link) to get a session ID.
3. Call dlPoll to confirm the success of each session ID obtained in Step 2.
4. Call dlBufAlloc for all required input and output buffers.
5. Call dlRead to queue the initial read request.
6. Call dlWrite to send requests and data to Freeway (Section 3.4 on page 55).
7. Call dlRead to queue reads to receive responses and data from Freeway (Section 3.5 on
page 80).
8. As I/Os complete and the I/O completion handler is invoked, call dlPoll to confirm the
success of each dlWrite in Step 6 and to accept the data from each dlRead in Step 7.
9. Repeat Step 6 through Step 8 until you are finished writing and reading.
10. Call dlBufFree for all buffers allocated in Step 4.
11. Call dlClose for each session ID obtained in Step 2.
12. Call dlPoll to confirm that each session was closed in Step 11.
13. Call dlTerm to terminate your applications access to Freeway.