Specifications
B-1Calculatin Page Width Using Printer Colon File Escape Sequence
Appendix B. Calculating Page Width Using Printer
Colon File Escape Sequences
The printer colon file for an ASCII queue on an IBM 4029 LaserPrinter defines page width,
in characters, with the work attribute wW. As formatted by the lsvirprt ( Viewing,
Formatting, or Modifying Virtual Printer Definitions on page 4-136) command, wW is defined
as follows:
Page Width In Characters, Using Width From Data Base (used in
pipelines)
wW = %?%Cw%t%f!w%e%I_w%;
%? <IF>
%Cw PUSH: (1 If –w Flag on Command Line; Otherwise 0)
%t <THEN>
%f!w For Each Flag x on Command Line: ”–xArgument” –>
OUTPUT
%e <ELSE>
%I_w INCLUDE: (COLUMNS per page)
%; <END>
The %Cw checks to see if the w flag was used on the command line; if it was, then a 1 is
pushed onto the stack, else a 0 is pushed onto the stack. In this case, the w flag was not
used on the command line so a 0 is pushed onto the stack. The %t checks for a true
(non–zero) value on the stack and, not finding one, executes the %e (else) construct %I_w.
The _w attribute is defined as %IwX, shown below as formatted by the lsvirprt command.
Default Page Width (characters)
wX =
%?%G_z%{1}%&%t%GwK%e%GwJ%;%?%G_p%{17}%=%t%{171}%e%G_p%{10}%*%;%*%
?%G_W%t%{6000}%e%{3000}%;%/%d