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:
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:
  1. 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.
  2. Processing is suspended.
  3. 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.
  4. 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.