Google Answers Logo
View Question
 
Q: AIX Print to File ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: AIX Print to File
Category: Computers > Operating Systems
Asked by: clueless-ga
List Price: $10.00
Posted: 28 Mar 2003 19:37 PST
Expires: 27 Apr 2003 20:37 PDT
Question ID: 182646
I would like to set up a printer device/queue in AIX 4.2 that outputs
to a file. I am trying to redirect reports from a software program
that are meant to be printed. The program calls a list of defined
printer queues to choose from for the output. In order to get this
information to a file, I need the file to appear as a print queue.
Ideally this solution would prompt for a filename each time a print
job was sent to it. Alternatively, the ability to pre-set the filename
would work.
Answer  
Subject: Re: AIX Print to File
Answered By: theta-ga on 29 Mar 2003 00:58 PST
Rated:5 out of 5 stars
 
Hi clueless-ga,
   You can redirect printer output to a file, by setting up a virtual
printer. Follow these steps:
   - First create a new file in the /dev directory
         touch /dev/myfile
   - Run the following command:
          smit mkpq
   - In the screen that appears, select the option to print to a file
   - Enter the name of the file you created in the first step 
   - Enter a name for this printer

Now you can select this printer from the print queue and the data sent
to it will be appended to the file you created.

If you want to make a seperate file for each print job, here are some
suggestions you can try:
 - You can try changing the device(in our case, the file) associated
with a particular queue, using the chquedev command.
        chquedev /qQNAME /dNEWFILENAME
    For more information on the chquedev command, check out:
        - Commands Reference, Volume 1 - chquedev Command
          ( http://hpc.snu.ac.kr/document/aixdocumentlibrary/en_US/a_doc_lib/cmds/aixcmds1/chquedev.htm)

- You could try writing a custom backend for your queue which would
save each job in a seperate file. Or, you can use a commercial one.
Archive, from Laix Software is "a printing utility for AIX which will
allow copies of all jobs sent to a print queue to be archived into a
specified directory for later use or retrieval."
  For more information on Archive and instructions for its use, see:
      - LAIX Software: Archive Documentation
        ( http://home.flash.net/~laixsoft/archive.htm )
  You can also download a fully functional 30 day trial version of
Archive from:
      - LAIX Software Consulting: Free evaluation software
        ( http://home.flash.net/~laixsoft/p0000010.htm )

You might also find the following USENET discussion of interest:
    - Subject: Printing to a file
      Newsgroup: comp.unix.aix
      ( http://groups.google.com/groups?threadm=LIQK6.49%24uC1.267205680%40newssvr10-int.news.prodigy.com)

====================================
Hope this helps.

If you need any clarifications, just ask!

Regards,
Theta-ga
:-)

=====================================
Google/Google Groups Search Terms:
     Aix "print to a file"
     Aix smit virtual printer

Request for Answer Clarification by clueless-ga on 29 Mar 2003 19:31 PST
This answsered my question thoroughly, but I am wondering if you can
help me with the next step. I downloaded the LAIX software and am able
to get each pprint job to save to a seperate file this way, but the
file names are somewhat confusing for an end user to determine which
file is their print job - I would like to be able to name the files
interactively each time a job is sent to the print queue. If you know
of a way to do this, I would be happy t\o post another question for
you at $10.
Thanks.

Clarification of Answer by theta-ga on 04 Apr 2003 22:20 PST
Hi clueless-ga,
  Sorry for the delay in replying to your query. I had sent an email
to LAIX Software (the makers of Archiver) regarding your query, and
was waiting for their reply. Unfortunately, I have not received any
reply from them yet.
  I personally believe that what you require is achievable by using
some customised scripts. However, scripting on the AIX is not an area
that I am familiar with, so I cannot create a working solution for
you.
  If I receive any information from LAIX Software, I will post it here
for your perusal.
Hope this helps. Thanks for the great rating.
Regards,
Theta-ga
:-)

Clarification of Answer by theta-ga on 09 May 2003 07:59 PDT
Hi clueless-ga, 
  I got a reply to my mail to Laix Software, and thought you might be
interested in it. According to the author, naming your print jobs is
indeed possible if :
"if you download Archive V2 which operates as a print queue filter
rather than as a print queue backend program. There are flags on
Archive V2 which allow you to specify directory structures and file
name formats for the archived print job files. You can include text
strings in your naming convention, dates, queue names, user names,
etc.  "

You can download a trial version of "Archive for AIX Version 2" (~60K)
from:
  - LAIX Software Consulting : Free evaluation software
    ( http://home.flash.net/~laixsoft/p0000010.htm )
You may wish to see the archive.readme file for several examples of
how to rename your print jobs.

Hope this helps.
Regards,
Theta-ga
:-)
clueless-ga rated this answer:5 out of 5 stars
Good Answer, thank you.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy