Hi,
Informix supports an extended ANSI syntax as follows for SELECT:
1. OUTPUT TO filename [WITHOUT HEADINGS] SELECT <statement>
2. OUTPUT TO PIPE <program> [WITHOUT HEADINGS] SELECT <statement>
The first syntax can be used for dumping mode; and the second for the offline/online printing mode.
Here is a Unix script file which can be used for this purpose.Please make sure that is file has a executable permission. To do this issue: chmod 755 lprn
example:
OUTPUT TO PIPE lprn SELECT * FROM customer;
listing of lprn
#!/bin/sh
#script to print file to the local printer port
echo "[5i"
#you may use cat, more, pr, lp etc.
pr $*
echo "[4i"
Regards
Shriyan