FORTRAN Reference Manual

Utility Routines
FORTRAN Reference Manual528615-001
15-19
Choosing a Spooling Level
Choosing a Spooling Level
The following list describes the three levels of spooling that you can specify.
Level-1 spooling
FORTRANSPOOLSTART uses level-1 spooling if options is zero and you omit
all other parameters. If you want all spooled files to use level-1 spooling, you can
specify PARAM SPOOLOUT 0 when you run your program, rather than using
FORTRANSPOOLSTART at all.
Level-1 spooling is desirable when your program contains direct calls to Guardian
procedures for the file, such as CONTROL and SETMODE, that do not work with
level-3 spooling.
Level-2 spooling
FORTRANSPOOLSTART uses level-2 spooling if options is zero, you specify at
least one other parameter, and you do not specify level-3-buffer.
Level-2 spooling is desirable when your program contains direct calls to Guardian
procedures for the file, such as CONTROL and SETMODE, that do not work with
level-3 spooling but you want to establish initial spooling parameters.
Level-3 spooling
FORTRANSPOOLSTART uses level-3 spooling if options is nonzero. Your
program can allocate a buffer by specifying level-3-buffer or you can omit
level-3-buffer, in which case FORTRAN allocates the buffer space at runtime.
If you want all spooled files to use level-3 spooling, you need not call
FORTRANSPOOLSTART at all. FORTRAN assumes level-3 spooling by default
and automatically allocates the required buffer space at run-time. However, you
must use FORTRANSPOOLSTART if you want to specify spool file attributes.
Considerations
Use FORTRANSPOOLSTART only in programs compiled with ENV OLD. The
FORTRAN compiler does not report an error if you use FORTRANSPOOLSTART
with ENV COMMON but the FORTRAN run-time library reports an error if your
program executes FORTRANSPOOLSTART in a module that specifies ENV
COMMON.
All FORTRANSPOOLSTART arguments are optional except unit-number. You
can use or omit them in any combination.
The FORTRANSPOOLSTART routine must be named in a GUARDIAN directive in
every compilation that refers to it.
If the OPEN statement in which you open unit-number specifies the TIMED
option, your program uses level-1 spooling regardless of the value you specify for
options when you call FORTRANSPOOLSTART.