FORTRAN Reference Manual

Utility Routines
FORTRAN Reference Manual528615-001
15-10
FORTRAN_SETMODE_ Routine
If error-return is zero, FORTRAN_SETMODE_ successfully issued a
SETMODE or SPOOLSETMODE operation.
If error-return is less than 10000, its value is a file system error code. For
information about file system errors, see the Guardian Procedure Errors and
Messages Manual . For information about errors returned by the
SPOOLSETMODE spooler procedure, see the Spooler Programmer’s Guide.
If error-return is greater than 10000, its value is a FORTRAN run-time error
code to which the FORTRAN run-time library has added 10000. To determine the
actual error code, subtract 10000 from the value returned in error-return and
see Appendix G, Run-Time Diagnostic Messages.
For example, if error-return is 250, the error is a file system error—the file
referenced by unit-number is on a node that is no longer accessible. If error-
return is 10064, you must subtract 10000 from error-return to produce error
64: the unit-number that you specified is not associated with a currently open
file.
function
specifies the SETMODE function to execute. For specific commands, see the
SETMODE procedure in the Guardian Procedure Calls Reference Manual.
param1
specifies the value of the first parameter to the specific SETMODE function you are
executing. For specific param values for each SETMODE function, see the
SETMODE procedure in the Guardian Procedure Calls Reference Manual.
param2
specifies the value of the second parameter to the specific SETMODE function you
are executing. For specific param2 values for each SETMODE function, see the
SETMODE procedure in the Guardian Procedure Calls Reference Manual.
FORTRAN_SETMODE_ calls the SETMODE system procedure unless unit-number
is a spooler collector doing level-3 spooling in which case FORTRAN_SETMODE_
calls the SPOOLSETMODE spooler procedure.
Considerations
Use FORTRAN_SETMODE_ only in programs that specify an ENV COMMON
directive. The FORTRAN compiler does not report an error if you use
FORTRAN_SETMODE_ with ENV OLD but the FORTRAN run-time library reports an
error if your program executes FORTRAN_SETMODE_ in a module that specifies ENV
OLD.