Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Multiple Copies Two Different Drawers

Status
Not open for further replies.

rstitzel

MIS
Apr 24, 2002
286
US
I have a program that generates invoices. We want to print these invoices on forms that will be passed through a laser printer. One Copy White (Drawer 1) and one Copy Yellow (Drawer 2). We'll print one page from one drawer and then the same page from the second drawer with ONE print file.

I can't figure out an easy way to do this.

I thought about printing one copy, closing the print file, overriding the print file to the second drawer and then process the invoice again. Doing this over and over seems very sloppy and I'll have hundreds of spool files in the out queue versus one. I also thought about just going back to two part forms on an impact printer. And I may do that if there isn't an easy way to do it the way I want.

Looking for any and all suggestions.

Thank you.
 
It's been awhile since my last AS400 programming(5yrs+) but I remember that you can setup a laserjet printer as a virtual printer. There should be a tray setting in the setup parameters and you can then just create two print files in your RPG program. You may have to do some trial and error as virtual printers do have some special characters that you have to watch out. In the early 80's I was fundamental in creating a sort of CL for printing PeopleSoft application reports onto laserjet printers. We installed SQR programming language in the AS400 machines because this is the easiest way to print high graphical reports such as pay checks with micr capabilities as well as signatures embeded in the printer simm chip. Truly it can take awhile to search my archives for all those printing functionalities but your situation is doable.
 
I did'nt noticed that you are printing into a form. Before we have used Peoplesoft application, we used ACCESS database capabilities to print forms. All we did is download the file to the database and from there we have a person proficient with ACCESS and let him do the rest.
 
I haven't tried automating this, but in theory, it should work:

Set the invoice print file up to save(*yes).

Once the first copy has been printed, execute "chgsplfa" on the spool file, DRAWER(YellowPaperDrawer)

Then execute "rlssplf" command.

If the invoice form is the only spool file that is generated during the job, this should be fairly straight-forward.

Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top