PRTPAGE
8.0.3, PLBCMP GUI Only
The PRTPAGE instruction outputs to a print device in page mode. Information may be placed anywhere on the page in any order. The instruction uses the following format:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
pfile
Required. A previously defined PFILE variable that has been opened using a PRTOPEN or a SPLOPEN (9.6B) instruction.
list
Required. A list containing any combination of character string Literals, Character String Variables, numeric literals or variables (FORM), VARLISTs of DIM, INIT or FORM variables, ARRAYs, individual array elements, valid control characters, and valid List Controls,
;
Optional. A semicolon that inhibits the normal carriage return and line feed.
Flags Affected: NONE
Note the following:
Individual items within {list} are separated with commas. The list of items may be continued on additional lines by terminating each continued line with a colon (:).
The {pfile} must have been previously opened via the PRTOPEN or a SPLOPEN (9.6B) instruction. For PDF output, only a SPLOPEN is supported. Otherwise, a S16 error will occur.
If a FILEPI instruction is active, it is terminated.
The first PRINT or PRTPAGE *DEFPRT instruction that starts the printing operations to perform PDF output causes a Windows runtime or client to present a standard file prep dialog to get the name from an end-user because the output PDF file name is unknown. Additionally, if the PDF output is being generated at the server system for Application Server, a standard file prep dialog is not presented and an appropriate Snn error occurs because the PDF file name is unknown.
When the syntax format (2) is used, the *DEFPRT indicates that the PRTPAGE operations are to be applied to the runtime default printer device only if the default printer device is opened to generate a PDF file output (9.6B). Otherwise, a 'S05' error occurs. The PRTPAGE *DEFPRT is implemented to allow advanced print controls to be set for the default printer output for a PDF file output that could otherwise not be set.
Example:
Literals
All characters within a pair of double quotes are sent to the default printer device/file exactly as they appear in the literal.
The first character in the literal is printed at the current print location.
The print location is incremented one position to the right for every character printed and remains one position to the right of the last character printed.
Control values (Ctrl) are sent as coded without translation or verification.
Variables
The contents of variables are printed on the printer whenever they appear in the list of a PRTPAGE instruction. The first character printed is at the current print position. The print position is bumped one position for each character printed. It remains one position to the right of the last character printed. Unless modified by a list control, they are printed as defined in the following two sections:
Character String Variables
The print begins with the first physical character and continues through the Length Pointer (LP).
Blanks are printed for each character between the Length Pointer and Physical Length (PL).
If the Form Pointer (FP) is zero, blanks are printed for each character position to the Physical Length.
If an item within the list is a character string Array and no specific array element has been designated, every array element is printed.
Numeric Variables
The print begins with the first physical character and continues through the Physical Length.
If an item within the list is a numeric array and no specific array element has been designated, every array element is printed.
See Also: Example Code, List Controls, Print Preview, Printer Instructions
![]() |