First step:
We have to configure the TCP/IP-LPD remote output queue with the command CRTOUTQ. Assuming that:

  1. the name of our printer will be 'LASER1'
  2. the name of the printer queue on the remote system is 'LPT1'
  3. the address of the remote system is '192.168.1.100'
  4. and we use a driver for a HP laserjet 4 printer,
the complete command we have to issue will be:
  CRTOUTQ OUTQ(QUSRSYS/LASER1) RMTSYS(*INTNETADR) RMTPRTQ('LPT1') AUTOSTRWTR(1) CNNTYPE(*IP) DESTTYPE(*OTHER) MFRTYPMDL(*WSCST) WSCST(QSYS/QWPHPLSR4) INTNETADR('192.168.1.100') DESTOPT('XAIX XAUTOQ')
			
If the remote system is defined in iSeries' hosts' table, the RMTSYS parameter can accept its name, avoiding the specification of the IP address (INTNETADR).
When printing via print server, you should use this utility from IBM, specifying it in the USRDTATFM, adding it to the command line above:
  ... USRDTATFM(QUSRSYS/TSPRWPR) TRANSFORM(*NO)
assuming that you have uploaded the TSPRWPR program in QUSRSYS library.

Second step:
Create a dummy device description for spooling print files. Assuming that:

  1. the name of the printer is 'LASER1'
the command will be:
  CRTDEVPRT DEVD(LASER1) DEVCLS(*VRT) TYPE(3812) MODEL(1) ONLINE(*NO) FONT(011)
  			

Please note that some parameters, like font type, are commands defaults, so they are not mandatory.

After the creation you could issue the following command to reclaim the spool queue:

  STRSPLRCL OUTQ(LASER1)
  			

(c)2003-2023 PaulTT