Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003

    Question Unanswered: PL/SQL command to print a saved file in unix?

    I've created and written a file to a unix directory using a stored procedure. Is there a way through that same stored procedure to send that file to a printer.

    Right now I'm using lp -d 1_it_zeb overpack_lbl.txt to print the file from a command prompt. How would I send this same command to unix using my procedure?


  2. #2
    Join Date
    Mar 2003
    Seattle WA

    Printing from pl/sql

    One method is to create a pipe on unix that performs a specific task, say printing in your case. The following example shows a pipe that is created such that it compresses that file being written to (in this case, PL/SQL).

    #--Setup the pipeline to be used in the export process
    mknod $dmp_file_name p
    compress < $dmp_file_name > $dmp_file_name.Z &

    You should be able to formulate a pipe to send the contents to a printer.

    Or, you could set up a cron job to look at files being generated and once completed, send it off to the printer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts