KB0001

How do I Configure a Printer or Print Queue?

Applies to: VC/m, RE/m, RE/data and RE/parser

The settings which are used to configure output devices depend on your operating system and M implementation:

Caché on Windows

To print to a network printer, eg PRINT1, which is attached to a machine on the network, eg SERVER1:

Device ID [|PRN|//SERVER1/PRINT1 ] Open parameters ["W" ] Use parameters [ ] Close parameters [ ]

Caché and ISM on UNIX

To print on the default UNIX print queue, eg /usr/bin/lp:

Device ID [/usr/bin/lp ] Open parameters ["QW" ] Use parameters [ ] Close parameters [ ]

To print on a print queue which is not the default, add the qualifier -d queue_name to the Device ID. For example, to print on a print queue called GJS:

Device ID [/usr/bin/lp -d GJS ] Open parameters ["QW" ] Use parameters [ ] Close parameters [ ]

As an alternative to the above, use the following open and close parameters with a file name, eg /tmp/xxx.lis:

Device ID [/tmp/xxx.lis ] Open parameters [("WN") ] Use parameters [ ] Close parameters [($e($zf(-1,"lp /tmp/xxx.lis>dev/null"),0)) ]

Notes:

  • The file /tmp/xxx.lis is used to hold the output while it is being created.
  • The $e(…,0) is required in order to return a null value back to the close command.

Caché on OpenVMS

In order to print on the default OpenVMS print queue, it must first be set up as a dummy LAT device. For example, to set up a dummy device LTA9999: which spools to the queue "GJS":

$ MCR LATCP $LATCP> CREATE PORT LTA9999:/APPLICATION $LATCP> EXIT $ SET DEVICE LTA9999:/SPOOLED=GJS

Then the following settings can be used in the software:

Device ID [LTA9999: ] Open parameters [ ] Use parameters [ ] Close parameters [ ]

GT.M on OpenVMS

To print on the default VMS print queue (SYS$PRINT), using the file name TEXT.TMP:

Device ID [TEXT.TMP ] Open parameters [NEWVERSION ] Use parameters [ ] Close parameters [(SPOOL:DELETE) ]

To print on a print queue which is not the default, add the close parameter QUEUE="queue_name". For example, to print on a print queue called GJS:

Device ID [TEXT.TMP ] Open parameters [NEWVERSION ] Use parameters [ ] Close parameters [(SPOOL:QUEUE="GJS":DELETE) ]

DSM on OpenVMS

To print on the default VMS print queue (SYS$PRINT), using the file name TEXT.TMP:

Device ID [TEXT.TMP ] Open parameters [NEWVERSION ] Use parameters [ ] Close parameters [(SPOOL:DELETE) ]

To print on a print queue which is not the default, add the close parameter QUEUE="queue_name". For example, to print on a print queue called GJS:

Device ID [TEXT.TMP ] Open parameters [NEWVERSION ] Use parameters [ ] Close parameters [(SPOOL:QUEUE="GJS":DELETE) ]

MSM on UNIX

To print on the default UNIX print queue:

Device ID [55 ] Open parameters [ ] Use parameters [ ] Close parameters [ ]

To print on a print queue which is not the default, add the open parameter -d queue_name. For example, to print on a print queue called GJS:

Device ID [55 ] Open parameters [("-d GJS") ] Use parameters [ ] Close parameters [ ]

DTM on DOS

To print to the printer on LPT1:

Device ID [30 ] Open parameters [file="LPT1:":mode="W" ] Use parameters [ ] Close parameters [ ]

Last reviewed: Nov 15, 2004

Back to VC/m Knowledge Base Articles