Source of Input Data
The source of input data is dependent upon the type of program initiation as follows:
| Method of Program Initiation | Data Source (Input Device) | ||
|---|---|---|---|
| When Associated with Environment-Name | When FROM Phrase Omitted | ||
| CONSOLE or SYSTEM-CONSOLE | SYSIN or REQUESTOR | ||
| BATCH | System operator’s message queue | Job input stream | Job input stream |
| INTERACTIVE | System operator’s message queue | Workstation | Workstation |
The job input stream consists of data that accompanies a CL command. If there is no data in the input stream, or if there is insuffient data to fill identifier-1, an exception occurs.
When the input is from the job input stream, the following rules
apply:
- An input record size of 80 characters is assumed.
- If identifier-1 is up to 80 characters in length, the input data must appear as the first characters within the input record. Any characters beyond the length of identifier-1 are truncated.
- If identifier-1 is longer than 80 characters, succeeding input records are read until the storage area of identifier-1 is filled. If the length of identifier-1 is not an exact multiple of 80 characters, the last input record is truncated.
When the device is the workstation, the input record size is 100.
When the device is the system operator's message queue, the input
record size is 58. The following steps occur:
- A system-generated inquiry message containing the program-name, the text “AWAITING REPLY FOR POSITION(S)”, and the beginning and ending positions is automatically sent to the system operator's message queue or workstation operator. Previous DISPLAYs can also appear on the ACCEPT screen.
- Processing is suspended.
- The reply is moved into identifier-1, and processing is resumed after a reply is made by the operator to the inquiry in step 1. The reply value is made available to the program as it was typed, in uppercase or lowercase.
- If identifier-1 is longer than the input record size, succeeding input records are read (steps 1-3) until identifier-1 is filled.
If the incoming reply is longer than identifier-1, the character positions
beyond the length of identifier-1 are truncated.
Note: If the device
is the same as that used for READ statements, results are unpredictable.