Kore Tech Tip
How to Send Data to Printer and Hold File Simultaneously
Tip
#1008

How to print the same data to both a printer and a hold file

Here's a little Tech Tip we put together in response to a question that came up in one of the DataFlo IT Special Interest Group emails. We were told the following solution worked great for their purposes.

After checking the UniVerse manuals for syntax, we tested the following program on our Universe DBMS. It worked, both printed my output and sent the second copy to a hold file. This will work in both the UniData and UniVerse environments, you just need to change the SETPTR arguments for your printers (the first argument is the Printer# which is for your user session only).
0001: ** PT.TEST
0002: **
0003: * Let's assign my default printer first
0004: *
0005:       EXECUTE 'SETPTR 0,,,,,1,AT {your printer},BRIEF'
0006: *
0007: * Let's use a printer hold file second
0008: *
0009:       EXECUTE 'SETPTR 1,,,,,3,NFMT,NHEAD,BRIEF,NOFORMFEED,BANNER PT'
0010: *
0011:       FOR PTR.NO = 0 TO 1
0012:          PRINTER ON
0013:          PRINT ON PTR.NO "Test Printer ":PTR.NO
0014:          PRINTER OFF
0015:       NEXT PTR.NO
0016:    END   
UniData and UniVerse are products, copyrights and trademarks of Rocket Software

DataFlo is a product, copyright, and trademark of Epicor Corporation
 
 
 
Our technical tips are provided to help you find new or easier ways to solve some of your technical challenges or to show you a new technique. We hope you find them useful. Please contact us if you would like to share one of your Tech Tips or need help solving a technical challenge. We would be happy to help you.