ITEM: E3915L

How do I get AIX to do NO printer formatting?




Question:

I have a Risc 6000 running AIX 3.2.4 with lots of PTFs.  How can I set
my print queues so that they do no formatting at all?

A.  Change the _d virtual printer attribute to "p" for pass through
mode.  You can also change the backend program to /bin/cat.

Response:

I tried the passthru option as suggested and it still did not work.
I was unsure what was menat by adding /bin/cat as a backend.

Again, before applying U421431 ( and others) I had the 
virtual printer attribute _l=0, which page lengths.
We could print our checks and invoices with no problem.
No the alignment is off.

With the passthru printing linefeeds are not being recognized
which means it tries to print everthing on one line.

Response:

After the formatter was put into passthru mode (_d=p in the virtual printer
definition), the only remaining problem seemed to be the lack of a mapping of
linefeeds to linefeeds and carriage returns (LF-->LFCR).  

This can be corrected by adding a filter to the virtual printer in question,
which is done as follows.  At least this is one way to do it.

The following (simple) filter is compiled and named "nlcr."

\#include \

main(int argc, char **argv)
{int ch ;

while (EOF != (ch = fgetc(stdin)))
 {
  switch (ch)
    {
     case 10: fputc(ch,stdout) ;
              fputc(0x0D,stdout) ;
              break ;
     default: fputc(ch,stdout) ;
              break ;
    }
 }
}
After nlcr exists:

 1. chmod root.printq nlcr
 2. chmod 555 nlcr
 3. chmod u+s nlcr
 4. Use lsvirprt to set the value of the fc attribute to the fully qualified
    pathname of nlcr.
 5. Use lsvirprt to set the value of _f to c
 6. Use lsvirprt to set the value of _d to p

Any job put on this queue will have all linefeeds converted to a linefeed and a
carriage return, despite the fact that _d=p turned that mapping off in the
formatter itself.

Interested users can read about the /bin/pr filter for further information.

User has another problem with his COBOL application.  The check runs begin
with a forms alignment test.  Only part of the data is printed.  Subsequent
jobs do NOT push the data out of some buffer, so the question is where did it
go?

User's virtual printer is generic ASCII (ci and cr are NULL), and _d=p, so the
queueing system and the foramtter should not be eating data.

Told the user how to trap the datastream in a file and see if the application
is actually writing the missing data.

Response:

User trapped the datastream and determined that their COBOL
application was missing a period at the end of some COBOL statement.
It works now.


Support Line: How do I get AIX to do NO printer formatting? ITEM: E3915L
Dated: November 1993 Category: N/A
This HTML file was generated 99/06/24~13:30:54
Comments or suggestions? Contact us