An IBM 4029 LaserPrinter supports four distinct data streams. The root user can use the mkvirprt command to create both a queue and a virtual printer definition for each of the four data stream types. The root user can further use the lsvirprt command to view and modify the colon file underlying the virtual printer definition. For a system on which a queue of each type has been defined, issuing of the lsvirprt command results in the following list and query being displayed (queue names and device are chosen by the root user at queue creation time):
No. Queue Device Description 1 asc lxx 4029 (IBM ASCII) 2 gl lxx 4029 (Plotter Emulation) 3 pcl lxx 4029 (HP LaserJet II Emulation) 4 ps lxx 4029 (PostScript) Enter number from list above (press Enter to terminate): ->
From this list, the root user enters the number corresponding to the virtual printer that he wants to view, format, or modify. The following message and prompt are then displayed.
To LIST attributes, enter AttributeName1 ... (* for all attributes) To CHANGE an attribute value, enter AttributeName=NewValue To FORMAT and EDIT an attribute value, enter AttributeName~v To EDIT the attribute file, enter ~v To terminate, press Enter:
There are six options at this point, one of which is to simply press Enter and terminate the lsvirprt command. The other five are more interesting.
Each of these five options will be discussed in the context of the asc queue and the associated virtual printer definition with its underlying colon file.
Entering an asterisk (*) and pressing Enter will result in the following being displayed:
Name Description Value __FLG VALUES THAT MAY BE OVERRIDDEN WITH FLAGS ON THE COMMAND LINE _0 (not used) _1 (not used) _2 (not used) _3 (not used) _4 (not used) _5 (not used) _6 (not used) _7 (not used) _8 (not used) _9 (not used) _A stderr returned? 0: no; 1: yes, & pipelines; 2: 1 yes, & values, pipelines _E Double-High Print. (!: no; +: yes) _F (not used) Font file name _G Page format (!: use only printable page +: use ! entire addressable area) _H Name To Replace Host Name On Burst Page _I Font ID (overrides pitch and type style) _J Restore the Printer at the End of the Print Job? + (!: no; +: yes) _K (not used) _L Wrap Long Lines (!: no; +: yes) + _O Type of Input Paper Handling (1: manual, 3: 3 sheetfeed) _Q Paper or Envelope Size For the Paper Source %IwQ Selected By the -O and -u Flag Values (Refer to the s0, s1, s2, s3, and s4 attributes); Default value: %IwQ _S High speed printing _U Unidirectional printing _V Vertical printing _W Double-Wide Print (!: no; +: yes) ! _X Code Page Name For Print Data Stream (file with IBM-850 same name in dir. "d1") _Y Duplex Output (0: Simplex 1: Duplex Long-Edge 2: 0 Duplex Short-Edge) _Z Issue Form Feed Between Copies & At Job End (!: + no; +: yes) :
The output is formatted by the pg command, hence the full colon (:) at the bottom of the display. The output above is only the first full screen. The rest is available through the normal pg subcommands but will not be displayed here for reasons of brevity. This output is view-only; the attributes cannot be modified.
Entering the name of an attribute, such as _w (page width in columns), and pressing Enter will result in something like the following being displayed.
Name Description Value _w Page Width (characters); Default Value: %IwX %IwX (value based on paper size specified with s0 - s5 attributes)
To LIST attributes, enter AttributeName1 ... (* for all attributes) To CHANGE an attribute value, enter AttributeName=NewValue To FORMAT and EDIT an attribute value, enter AttributeName~v To EDIT the attribute file, enter ~v To terminate, press Enter:
The name of the attribute is displayed, along with its text description from the message catalog and its current value. The prompt is also redisplayed. Note that you do not have to type the underscore for attributes whose name begin with an underscore. For example, the results above could have been obtained by typing w and pressing Enter. This output is view-only; the attribute cannot be modified.
Other attributes may be much harder to read in this form. For instance, entering ia at the prompt and pressing Enter will result in something like the following being displayed:
Name Description Value ia ASCII %Ide/pioformat -@% Idd/%Imm -!%Idf/pi of5202 -l%IwL -w%I wW %f[begijpqstuvx yzEGIJLOQWXZ] %Uh
To LIST attributes, enter AttributeName1 ..(* for all attributes) To CHANGE an attribute value, enter AttributeName=NewValue To FORMAT and EDIT an attribute value, enter AttributeName~v To EDIT the attribute file, enter ~v To terminate, press Enter:
Entering the name of an attribute, an =, and a value, and pressing Enter will result in the attribute being assigned that value, and the new value being displayed. For instance, entering _w=60 and pressing Enter, or entering w=60 and pressing Enter, will result in something like the following being displayed:
To LIST attributes, enter AttributeName1 ..(* for all attributes) To CHANGE an attribute value, enter AttributeName=NewValue To FORMAT and EDIT an attribute value, enter AttributeName~v To EDIT the attribute file, enter ~v To terminate, press Enter: w=60
Name Description Value _w COLUMNS per page 60
To LIST attributes, enter AttributeName1 ..(* for all attributes) To CHANGE an attribute value, enter AttributeName=NewValue To FORMAT and EDIT an attribute value, enter AttributeName~v To EDIT the attribute file, enter ~v To terminate, press Enter:
The new value of w is displayed. (This example would result in the page width for this queue being permanently set to 60 columns.)
Entering ~v and pressing Enter will result in something like the following being displayed:
:056:__FLG:: :625:CB:S[B]DyEn: :626:CC:S[C]DyEn: :627:CD:S[D]DyEn: :628:CE:S[E]DyEn: :629:CF:S[F]DyEn: :630:CG:S[G]DyEn: :622:Ca:DyS[G500]I[1810532]EnR[pioattr1.cat,1,631;(diag1) - do not print job; di splay main pipeline and pre-processing filter,(diag2) - do not pr int job; displa y all pipelines and filters,(display) - print job; display all pi pelines and fil ters,(ignore) - print job; ignore stderr produced by filters,(nor mal) - print jo b; exit if filters produce stderr=-a1,-a0\x27 \x27-A3,-a0\x27 \x2 7-A2,-a0\x27 \x 27-A0,-a0\x27 \x27-A1]:%?%G_a%t-a%I_a%e-a%I_a\x27 \x27-A%I_A%; :674:Cs:S[B005]I[1810500]EnC[_s,_p]R[%`W0]:-s%I_s\x27 \x27-p%I_p :013:_A:DnEnR[0,1,2,3]:1 :789:_E:S[B020]I[1810501]%IWY:! :790:_G:S[E025]I[1810502]%IWY:! :621:_H:S[F350]I[1810503]Dy: :024:_I:Dn: :791:_J:S[C950]I[1810533]%IWY:+ :792:_K:Dn: :793:_L:S[D020]I[1810504]%IWY:+ :697:_O:DnEnR[1,3]:3 :683:_Q:S[E020]I[1810505]En%IW6:%IwQ :794:_W:S[B025]I[1810506]%IWY:! :795:_X:S[D030]I[1810507]EtL[/usr/bin/ls -1 /usr/lib/lpd/pio/tran s1 | /usr/bin/s ed '/^850$/d']V[%`WX]:ISO8859-1 :808:_Y:Dn: :614:_Z:Dn%IWY:+ :063:_a:DnEnR[0,1]:0 :635:_b:S[D010]I[1810508]E#G[0..%?%G_l%{0}%=%t%e%G_l%G_t%-%{1}%-% d%;]:0 :658:_d:S[C925]I[1810509]EnL[%IW2]F1:a :615:_e:S[B010]I[1810510]%IWY:! :659:_f:S[C930]I[1810535]EtL[%IW3]F1V[%`W7]Dy: :623:_g:S[C250]I[1810511]E#G[1..]:1 "/var/spool/lpd/pio/@local/custom/asc:lp1" 318 lines, 15318 chara cters
As is indicated by the last line of this sample, this is a vi session with the raw, unformatted version of the undigested printer colon file for this queue. If a write command is issued in this vi session, the definition is digested by the piodigest command and a new version of the digested printer colon file is created.
The most powerful option in lsvirprt is to type an attribute name followed by a ~v. For instance, entering ia~v and pressing Enter will result in something like the following being displayed:
ASCII ia = %Ide/pioformat -@%Idd/%Imm -!%Idf/piof5202 -l%IwL -w%IwW %f[ begijpqstuvxyzEGIJLOQWXZ] %Uh
%Ide INCLUDE: (Directory Containing Miscellaneous Modules) '/pioformat -@' %Idd INCLUDE: (Directory Containing Digested Data Base Fil es) '/' %Imm INCLUDE: (File Name Of (Digested) Data Base; Init. By "piodigest" (mt.md.mn.mq:mv)) ' -!' %Idf INCLUDE: (Directory Containing Loadable Formatter Rou tines) '/piof5202 -l' %IwL INCLUDE: (Page Length In Chars, Using Length From Dat a Base (used in pipelines)) ' -w' %IwW INCLUDE: (Page Width In Characters, Using Width From Data Base (used in pipelines)) ' ' %f[begijpqstuvxyzEGIJLOQWXZ] For Each Flag x on Command Line: " -xArgument" -> OUTPUT ' ' %Uh Indicate to piobe: Pass the Following Attributes to s ubsequent printer commands
/tmp/asc:lp1.ia" 24 lines, 1001 characters
As is indicated by the last line of the sample, this is again a vi session, but this time the attribute definition has been formatted and annotated. Here the root user can modify the attribute definition; if a write command is issued in this vi session, the definition is digested by the piodigest command and a new version of the digested printer colon file is created.
The formatted sample is divided into three parts. The first part is the ia=, followed by the attribute definition strung out horizontally. The second part is the annotations on the right-hand side of the vi session, the comments that describe the function of each particular printer colon file escape sequence. The third part is the formatted printer colon file escape sequences aligned on the left margin of the vi session. These escape sequences also have a horizontal formatting component; indentations are used to clarify the flow of if-then-else statements, nested or otherwise.
The first and second parts can be edited, but the editing changes have no effect and should therefore not be performed. Any changes made to the initial definition of the attribute or to the annotations will be ignored by piodigest if you write the file. It is the third part, the formatted attribute definition, that can be edited. If this part is edited and written, piodigest will issue an error message if any syntax errors are found. As with normal programming languages, you can make logic errors, but not syntax errors.
For practical examples of modifying printer colon files, see "Modifying the mi, mp, and _d Attributes on a PostScript Queue" .