Guardian Procedure Calls Reference Manual
OPEN^FILE Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
EDIT File Considerations
Level-3 Spooling Considerations
Example
Related Programming Manual
Summary
The OPEN^FILE procedure permits access to a file when using sequential I/O (SIO) procedures.
Syntax for C Programmers
#include <cextdecs(OPEN_FILE)>
short OPEN_FILE ( short _near *common-fcb
,short _near *file-fcb
,[ short _near *block-buffer ]
,[ short block-bufferlen ]
,[ __int32_t flags ]
,[ __int32_t flags-mask ]
,[ short max-recordlen ]
,[ short prompt-char ]
,[ short _near *error-file-fcb ] );
• CEXTDECS (through the included file TNSINTH) defines 32-bit values as the typedef
__int32_t, which for TNS and TNS/R compiles is defined as long and for TNS/E compiles
is defined as int.
Syntax for TAL Programmers
error := OPEN^FILE ( common-fcb ! i
,file-fcb ! i
,[ block-buffer ] ! i
,[ block-bufferlen ] ! i
,[ flags ] ! i
,[ flags-mask ] ! i
,[ max-recordlen ] ! i
,[ prompt-char ] ! i
,[ error-file-fcb ] ); ! i
Parameters
common-fcb
input
INT:ref:*
is an array of FCBSIZE or FCBSIZE^D00 words for use by the SIO procedures. Only one
common file control block (FCB) is used per process. This means the same data block is passed
to all OPEN^FILE calls. The common FCB must be initialized before the first call to OPEN^FILE
908 Guardian Procedure Calls (O)