CRE Programmer's Guide
CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
2-29
Standard Input
Standard Input
Standard input is a special file that is available to all programs that use the CRE. You
must open it for read-only access.
The device for standard input must support sequential read access. The CRE supports
the following devices for standard input:
•
A process (other than a spooler collector)
•
$RECEIVE, described in Using $RECEIVE on page 2-34
•
A disk file
•
A terminal
The CRE determines the file name for standard input as follows. If the INFILE name in
your program’s startup message is:
•
Not the name of your program’s home terminal, the CRE uses the INFILE name
from the startup message for standard input.
•
Blanks, the CRE does not open a system file but accepts open requests and
returns end of file each time your program reads from standard input.
•
The name of your program’s home terminal and you do not specify the
EXECUTION-LOG PARAM, the CRE opens your home terminal if your program
opens standard input.
•
The name of your program’s home terminal and you specify a file name as the
EXECUTION-LOG, the CRE uses the file you specify for the EXECUTION-LOG as
standard input.
For example, if your home terminal is named $TERM and you specify AFILE for
EXECUTION-LOG, the CRE opens AFILE if a routine in your program opens
standard input:
PARAM EXECUTION-LOG AFILE
RUN myprog / IN $TERM, ..... /
Figure 2-10. Process Startup Message Layout
21 1VST .VSD
-1
vol
name
subvol
name
Msg
Code
Process
Defaults
vol
name
subvol
name
file
name
INFILE
vol
name
subvol
name
file
name
OUTFILE
Cmd-Line
String