PFILE
ANSI
The PFILE instruction defines spool files used for alternate PRINT spooling. It uses one of the following formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
^
Optional. Denotes the item as being a POINTER.
%
Optional. Denotes the item as being GLOBAL.
%%
Optional. Denotes the item as GLOBAL but does not initialize it in any way.
Flags Affected: NONE
Note the following:
A PFILE must have been defined with a PFILE definition instruction before being referenced in a PRINT instruction.
A SPLOPEN instruction must have been performed using the given PFILE variable before performing any PRINT instructions using the PFILE variable.
The PFILE variable may not be in common and therefore is not kept open across program chains. A PFILE variable that is declared as GLOBAL is kept open across program chains.
The ^ denotes a Pointer Variable.
If the % form is used, the data item is placed in the Global Data Area. The variable would be available to other programs that also declared it with the percent form. Global Data Items are available with PLBCMP only.
If the %% form is used, the data label is placed in the Global Data Area but no initialization takes place if it has not already been defined in the Global Data Area. Global Data Items are available with PLBCMP only.
Example 1:
|
|
|
PRTFILE may be used for print spooling.
Example 2:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PTRPFILE is a Pointer Variable that contains the address of another PFILE variable at execution time. This assignment is usually accomplished via the parameterized CALL instruction. Once initialized, PTRPFILE may be used as any other PFILE variable. It takes on all the attributes of the pointed to PFILE variable.
Example 3:
|
|
|
|
This instruction defines a global print file. It is kept open during the CHAIN instruction.
Example 4:
|
|
|
|
This instruction defines a global PFILE whose attributes are undefined. Prior to opening, it must be defined by performing a LOADMOD instruction or a CALL instruction of a separately compiled routine that defines the file with a '%' operator.
See Also: File Definitions, Printer Instructions
![]() |