Download IBM Application System/400 System/38-Compatible

Transcript
PROCEDURE DIVISION
is N, FORMAT is N, and NO DATA is N, then the single device is D and multiple device
is A.
Phrase
Y=Yes
Checked at Compilation
TERMINAL4
N=No
FORMAT4
NO DATA
N N N N Y Y Y Y
N N Y Y N N Y Y
N Y N Y N Y N Y
Determined at
Run Time
Single Device
Multiple Device
D C D B D C D B
A A D B D C D B
Codes A through D are explained below.
Code A–Read From Invited Program Device (Multiple Device Files only)
This type of READ receives data from the first invited program device that has data
available. An invited program device is a work station or communications device
(LU1, BSC, or APPC) that has been invited to send input. Inviting is done by writing to
the program device with a format that has the DDS keyword INVITE specified.
Once an invited program device is actually read from, it is no longer invited. That
program device will not be used for input by another READ statement unless reinvited, or unless a READ is directed to it specifying the TERMINAL phrase or FORMAT
phrase.
The record format returned from the program device is determined by the system.
This READ can complete without returning any data in the following cases:
1. There are no invited devices. This is the AT END condition, which occurs when:
There are no invited devices.
For an APPC device, another READ is done after a detach signal is received.
For an LU1 device, the session is terminated by the host.
2. A controlled cancel of the job occurs. This results in a file status value of 9A
and a major-minor return code value of 0309.
3. The NO DATA phrase is omitted and the specified wait time expires. This results
in a file status value of 00 and a major-minor return code value of 0310. The
specified wait time is the value entered on the WAITRCD parameter for the file.
4. The NO DATA phrase is specified and there is no data immediately available
when the READ is processed.
If data is available, it is returned in the record area. The record format is returned
in the I-O-FEEDBACK area and in the CONTROL-AREA.
Code B–Read From One Program Device (Invalid combination)
A compilation time message is issued and the NO DATA phrase is ignored. See the
table entry for the same combination of phrases with the NO DATA phrase omitted.
4
If the phrase is specified and the data item or literal is blank, the phrase is treated at run time as if it were not specified.
Chapter 5. Interactive Processing Considerations and Example Programs
133