MPE/iX Commands Reference Manual (32650-90877)
Chapter 5 183
Command List III
Commands DATA thru EXIT
An EOD causes the read of the FREAD intrinsic to return the CCG condition code to the
calling program. This condition code indicates the end-of-file condition on the terminal.
Table 5-7. on page 183 defines the various end-of-file indicators.
Use
EOD is available only in a job or a session that is submitted with the STREAM command. It
cannot be used directly from $STDIN or from a program.
Examples
To terminate a data file entered by using the STREAM command for a session identified as
SESS1,BLACK.ACCTSP, your data file would contain EOD as its last record, as follows:
DATA SESS1,BLACK.ACCTSP
.
data
.
EOD
The following program is an example of how EOD is used to terminate a set of data entered
through a standard input device:
FORTRAN
PAGE 0001 HP32102B.01.12 (C) HEWLETT-PACKARD CO. 1986
>$CONTROL USLINIT
> PROGRAM MONEY
> INTEGER QUARTERS,DIMES,NICKELS,PENNIES
> DISPLAY "INPUT MONEY AMOUNT IN DECIMAL FORM"
> ACCEPT DECIMALFORM
> CALL CHANGER(DECIMALFORM,QUARTERS,DIMES,NICKELS,PENNIES)
> DISPLAY QUARTERS," QUARTERS"
> DISPLAY DIMES," DIMES"
> DISPLAY NICKELS," NICKELS"
> DISPLAY PENNIES," PENNIES"
> STOP
> END
PROGRAM UNIT MONEY COMPILED
> SUBROUTINE CHANGER(DECIMALFORM,QUARTERS,DIMES,NICKELS,PENNIES
> INTEGER QUARTERS,DIMES,NICKELS,PENNIES
> DECIMALFORM = DECIMALFORM*100
> QUARTERS = DECIMALFORM/25
Table 5-7. End-of-File Indicators
Type of File Indicators
DATA file from standard input
device (for jobs and sessions)
EOD - terminates $STDIN and $STDINX. : followed by any other
character - terminates $STDIN.
DATA files
EOD
JOB
DATA