ibm-midrangejt400

How to set printing tray / drawer in as400?


I am trying to print a spool file from the IBM AS400 / System I. Creating a spool file and printing works fine.

However changing the Source drawer does not seem to any any effect. Printer has 5 trays set up. Tried all numbers from 1 to 5.

There's a DTM software to print DTM documents, it has the ability to choose which tray to go after. So the printer settings should be right

Selecting tray though cups works.

Any help with this would be appreciated

Things that I have tried so far:

Jruby code:

# Create printer
printer = com.ibm.as400.access.PrinterFile.new(as400, '/QSYS.LIB/PRINTER3.FILE')

# Set parameters
params = com.ibm.as400.access.PrintParameterList.new
params.setParameter(com.ibm.as400.access.PrintObject::ATTR_OUTPUT_QUEUE, '/QSYS.LIB/QUSRSYS.LIB/PRINTER3.OUTQ')
params.setParameter(com.ibm.as400.access.PrintObject::ATTR_DRWRSEP, 2)
params.setParameter(com.ibm.as400.access.PrintObject::ATTR_HOLD, '*YES')
params.setParameter(com.ibm.as400.access.PrintObject::ATTR_WORKSTATION_CUST_OBJECT, '/QSYS.LIB/QGPL.LIB/DRAWER2.WSCST')

# Write pdf to spooled
out = com.ibm.as400.access.SpooledFileOutputStream.new(as400, params, printer, nil)
out.write(pdf.to_java_bytes)
out.close

# Returns the spool file in AS400
out.getSpooledFile

Solution

  • I am able to set this with an print override choosing a specific drawer of a Xerox brand copier that is on our network. For example, one of my CL files contains the line:

    OVRPRTF  FILE(*******) TOFILE(*******)          +    
             DEVTYPE(*AFPDS) PAGESIZE(64 96)        +    
             LPI(6) CPI(12) OVRFLW(64) FONT(416 10) +    
             FIDELITY(*ABSOLUTE) SAVE(*YES)         +    
             OUTQ(**********) DRAWER(4) FRONTMGN(0 .281)
    

    (company specific data replaced by asterisks)

    This works for me. Our copier has drawer #1 stocked with 11 x 17 paper, so if I do not put this in the override, it by default prints onto large paper. DRAWER(4) directs it to use the drawer we have stocked with 8-1/2 x 11 paper (letter size).