FORTRAN Reference Manual

Utility Routines
FORTRAN Reference Manual528615-001
15-15
FORTRAN_SPOOL_OPEN_ Routine
max-pages
is an integer expression whose value specifies the maximum number of pages for
the spooler job. max-pages must be in the range 1 through 65,534. If max-pages
is zero or omitted, the spooler does not impose a limit on the number of pages it
writes.
Considerations
Use FORTRAN_SPOOL_OPEN_ only in programs that specify an ENV COMMON
directive. The FORTRAN compiler does not report an error if you use
FORTRAN_SPOOL_OPEN_ with ENV OLD but the FORTRAN run-time library
reports an error if your program executes FORTRAN_SPOOL_OPEN_ in a module
that specifies ENV OLD.
All the arguments except unit-number are optional. You can use or omit them in
any combination.
The FORTRAN_SPOOL_OPEN_ routine must be named in a GUARDIAN directive
in every compilation that refers to it.
You can invoke the FORTRAN_SETMODE_ and FORTRAN_CONTROL_ utility
routines if you specify buffered spooling and you need to invoke operations defined
by the SPOOLSETMODE or SPOOLCONTROL system routines.
The following rules show the values to specify for spooling-level if unit-
number is 6 and the spooler collector associated with unit 6 might be opened by a
routine in your process that is written in a language other than FORTRAN:
°
If the original open of the file resulted in buffered spooling, a call to
FORTRAN_SPOOL_OPEN_ for the same file must specify spooling-level
> 0 or spooling-level = -1.
°
If the original open of the file resulted in level-1 or level-2 spooling, a call to
FORTRAN_SPOOL_OPEN_ for the same file must specify spooling-level
= 0 or spooling-level = -1.
°
If the original open of the file did not establish a spooling level (run-time
routines determine the spooling level) then if no routine has written records to
the file, you can specify any spooling level. If any routine in your process has
written at least one record to the file, then all subsequent opens should specify
spooling-level = -1. Specifying spooling-level = 0 or spooling-
level > 0 might not succeed, depending on whether the run-time routines are
using level-1 or level-3 spooling.