EOD [ MPE/iX Commands Reference Manual Volume I ] MPE/iX 5.0 Documentation
MPE/iX Commands Reference Manual Volume I
EOD
Denotes end-of-data on input stream from a job file (from an input other
than $STDIN). It also terminates data initialized by the DATA command.
The colon (:) is a required part of this command. (Native Mode)
Syntax
EOD
NOTE The "&" symbol has no meaning to the input spooler when it reads
records because the CI is not involved at that point.
Parameters
None.
Operation Notes
The EOD command is used to signify the end of data whose beginning was
signified by a DATA command. It is also used to signify the end of a
data set that was read from the standard input device.
Although in most cases programmers use EOD for delimiting data, any
record beginning with a colon may delimit the data. Using a record other
than EOD for this purpose, however, depends upon whether the standard
input file is opened with the file name $STDIN or $STDINX.
When using a compiler language that does not provide a convention for
terminating compilation (such as END. in SPL), you must enter EOD after
the last record of your source program to ensure proper delimiting of
your input. (EOD is not required when using the BASIC interpreter since
the subsystem provides different conventions for delimiting data.)
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 2-13 defines the various
end-of-file indicators.
Table 2-13. End-of-File Indicators
-------------------------------------------------------------
| | |
| Type of File | Indicators |
| | |
-------------------------------------------------------------
| | |
| DATA file | EOD - terminates $STDIN and $STDINX. |
| from | |
| standard | : followed by any other character - |
| input device | terminates $STDIN. |
| (for jobs | |
| and | |
| sessions) | |
| | |
-------------------------------------------------------------
| | |
| DATA files | |
| | EOD |
| | JOB |
| | DATA |
| | |
-------------------------------------------------------------
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
> REMAINDER = DECIMALFORM-(QUARTERS*25)
> DIMES=REMAINDER/10
> REMAINDER=REMAINDER-(DIMES*10)
> NICKELS=REMAINDER/5
> PENNIES=REMAINDER-(NICKELS*5)
> RETURN
> END
PROGRAM UNIT CHANGER COMPILED
> EOD
**** GLOBAL STATISTICS ****
**** NO ERRORS, NO WARNINGS ****
TOTAL COMPILATION TIME 0:00:01
TOTAL ELAPSED TIME 0:01:29
END OF COMPILE
Related Information
Commands DATA
Manuals None
MPE/iX 5.0 Documentation