When FCONTROL is issued with a controlcode
of 1, param specifies either a mode control
directive or a carriage control directive to be applied to the file
specified in filenum.
You can use FCONTROL to pass carriage control directives only
if the file being output is not spooled. For any files that are
written to disk or spooled prior to output, you must use the FWRITE
intrinsic to pass carriage control and mode control directives.
The Carriage Control directives passed through FCONTROL are
the same as those that are passed through FWRITE. Table 8-11 “Selected
Carriage Control Directives” lists the octal codes used for this purpose,
along with their corresponding carriage control actions. You will
find this table in the explanation of the FWRITE intrinsic later
in this chapter.
Carriage control can be passed through FCONTROL for a non-spooled
file regardless of whether the file was opened with CCTL
or NOCCTL specified in the FOPEN
or HPFOPEN call.
Mode control can also be specified through FCONTROL for non-spooled
files. Mode control specifies whether a carriage control directive
takes effect before printing (prespace movement)
or after printing (postspace movement). Mode
control is selected through specific octal codes from the Carriage
Control table. A value of %100 or %400 sets postspace movement,
%101 or %401 sets prespace movement.
When FCONTROL is used to specify a mode control directive,
an additional call to FWRITE or FCONTROL is required if you also
want to specify a carriage control directive.
If param contains one of the mode-control
directives, a value of 0 or 1 is returned to param
to indicate the mode setting of the device prior to the call. A
value of 0 indicates postspacing, a value of 1 indicates prespacing.
The default mode and carriage control is postspacing with
automatic page eject. This applies to all Hewlett-Packard supported
subsystems except FORTRAN77/iX and COBOLII/iX, which have prespacing
with automatic page eject.