Print Queue

The Print Queue specifies the destination of the printed output.

You can use the Print Queue to create a print file, spawn an operating system command, or print the output and delete the print file.

Valid Print Queue Values
Entry Meaning
No value Writes the output to a Uniface print file in the current working directory (unless redirected through the assignment file).
PRINTMAN Sends the output to the Microsoft Windows Print Manager, which displays the Print dialog box that allows you to specify printer properties.

If you do not want this dialog box to appear, specify /NODIALOG in Print Options.

PORT Sends the output directly to the logical printer specified in the Print Options field, for example, LPT1:.
@Command Spawns an operating system Command, passing the printed output to Command as a parameter.

More parameters can be added in the Print Options field.

#Command Spawns the Commandsynchronously, passing the printed output to Command as a parameter.

Uniface waits for the command to complete before continuing.

Other value Generates the print command for the operating system, appending any Print Options specified. The generated command depends on the operating system, version, and Uniface version. For example, on Unix it would be:

lp -s -d PrintQueuePrintFileNamePrintOptions

Spawning Commands

If the first character is the @ symbol, Uniface spawns the subsequent text as a command to the operating system and passes the name of the print file as a parameter, followed by any Print Options. This feature enables you to write your own printing procedures and shell scripts.

Command Parameters

The constituent parts of the command that Uniface spawns can be accessed in a script using the following parameters:

  • $0—value of Print Queue
  • $1PrintFileName
  • $2 through $n—options given in Print Options

Windows: Executing Commands in a Windows Command Window

In this example, the Print Queue starts a command window and the Print Options specifies further instructions to redirect the standard input (coming from Uniface) to a file myfile.ps.

Graphical content.

Related Topics