CRE Programmer's Guide

CRE Service Functions
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
6-24
CRE_Hometerm_Open_
param1
is the param1 parameter for a SETMODE or SPOOLSETMODE system procedure.
param2
is the param2 parameter for a SETMODE or SPOOLSETMODE system procedure.
Return Value
CRE_File_Setmode_ returns one of the following:
0 if the setmode 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:
Considerations
If the standard file associated with file_ordinal specifies buffered spooling or
undecided spooling and CRE_Spool_Start_ has not been invoked,
CRE_File_Setmode_ calls CRE_Spool_Start_.
If the file specified by file_ordinal is a spooler collector and your program is
using level-3 spooling for that file, CRE_File_Setmode_ invokes the
SPOOLSETMODE system procedure, passing the parameters to
CRE_File_Setmode_ to SPOOLSETMODE. Otherwise, CRE_File_Setmode_
invokes the SETMODE system procedure passing the parameters to
CRE_File_Setmode_ to SETMODE.
CRE_File_Setmode_ does not retry operations that return an error.
CRE_Hometerm_Open_
The CRE_Hometerm_Open_ function opens your process’s home terminal.
file_number
is assigned the file number of your process’s home terminal if the open operation
succeeds; otherwise, CRE_Hometerm_Open_ assigns -1 to
file_number.
Error Code Cause
55 Missing or invalid parameter
63 Undefined shared file
64 File not open
INT PROC CRE_Hometerm_Open_( file_number );
INT .EXT file_number; ! out TNS,native