CRE Programmer's Guide
CRE Service Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
6-8
CRE_File_Input_
CRE_File_Input_
The CRE_File_Input_ function reads a record from a standard file.
file_ordinal
identifies the standard file from which to read. You can use only the symbolic name 
CRE^Standard^Input for file_ordinal.
buffer:read_count
defines the data area (buffer) in which to store the data read. read_count 
specifies the maximum number of bytes to read.
count_read
if present, is the number of bytes read into buffer when CRE_File_Input_ returns 
control to your program. If no bytes are read, 
count_read is zero.
write_count
if present and has a value other than -1, is the number of bytes in buffer to write 
as a prompt before reading from the file. If you do not specify 
write_count, a 
prompt is not issued.
Return Value
CRE_File_Input_ returns one of the following:
•
0 if the input operation is successful
•
A positive number, which is a file system error number
•
A negative number, which is the negation of a CRE error number from the following 
table:
INT PROC CRE_File_Input_( file_ordinal, buffer:read_count, 
 count_read, write_count )
 EXTENSIBLE;
 INT file_ordinal; ! in, required
 STRING .EXT buffer; ! out, required
 INT read_count; ! in, required
 INT .EXT count_read; ! out, optional
 INT write_count; ! in, optional TNS,native
Error Code Cause
55 Missing or invalid parameter
56 Invalid parameter value
63 Undefined shared file
64 File not open
78 EDITREAD failed










