CRE Programmer's Guide

CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
2-27
Using CRE Functions to Access the Standard Files
Using CRE Functions to Access the Standard Files
Except under unusual circumstances, use only high-level language constructs to
access standard files. For programs running in the CRE, each language-specific run-
time library calls CRE functions to process your requests. Under some circumstances,
however, you might need to invoke CRE functions or system procedures directly. For
example, you might invoke CRE_File_Control_ to issue a page eject command to a
printer. If your program invokes CRE functions or system procedures directly, you must
ensure that the routines and procedures you invoke do not alter or interfere with the I/O
state maintained by the CRE.
The CRE provides the following functions for standard files. The functions are
described in Section 6, CRE Service Functions.
Figure 2-9. Using the CRE—The C Routine Writes to the File $VOL.SUBVOL.FILE
CRE_File_Close_ CRE_File_Open_ CRE_Hometerm_Open_
CRE_File_Control_ CRE_File_Output_ CRE_Log_Message_
CRE_File_Input_ CRE_File_Retrycheck_ CRE_Spool_Start_
CRE_File_Message_ CRE_File_Setmode_
COBOL:
TAL:
C: printf(“C\n”);
C Run-Time Library
210VST .VSD
$VOL
SUBVOL.FILE
3
COBOL Run-Time Library
NonStop Operating System
Common Run-Time Environment Library
2 1
0
A
B
C