tcl.assignfq

Verb: Access/Spooler, Releases: AP and AP 6.1

Links a printer to an output formqueue.

Syntax

assignfq formqueue,device.name{(Unix.command)}{, formqueue,device.name{(Unix.command)}{,...}} {(option} assignfq ?

Description

assigns a printer device driver to a Spooler formqueue.

This printer driver is then used by the Output processor (OP), or by Pick/BASIC '@' functions to generate special formatting commands like boldface, cursor positioning, or underlining, when output is directed to the spooler.

Using a '?' as a parameter produces brief on-line 'help'.

Multiple formqueue's can be updated in the command, but each queue must have an associated device name.

Printer drivers are located in the 'dm,devices,' file. The current driver assignments may be displayed with the 'listabs' command.

A printer may have more than one formqueue attached to it. (See the 'startptr' command).

On Unix-based implementations, the spooler has the ability to transfer data directly from the Pick process to a Unix-based operation such as a spooler, file, communications link, hardware device, etc. The relationship between Pick and the Unix process is established by the 'assignfq' command. Simply place the Unix command string in parentheses immediately after the 'device.name' field. Assignfq recognizes the parentheses to mean a Unix process and sets up the proper linkages. (See the 'startshp command.)

Options

c 'Compiles' devices file item into cursor control block (ccb).
The Cursor Control Block is a binary item, (sort of like a system-level dynamic array) which contains the codes and control strings pertinent to the device in question. Each system functions ( @(-(n)) ) has its own array position, and the system cursor function searches this item for control strings such as clear-screen, clear to end of screen, etc.

Example

assignfq 3,hp-lzrii

This assigns driver 'hp-lzrii' to formqueue 3.

assignfq 3,b(cat>/file1)
sp-assign f3?
Line# Status Copies Form# Device
7 p 1 3 b(cat>/file1)
list only md (p

The above assignfq command establishes a relationship between the Pick spooler
form queue 3 and the Unix process 'cat > /file1'. Then, the
sp-assign command tells the system to attach to form queue 3. Note that the
sp-assign is necessary even if the line is already assigned to form queue 3 so
that the process is informed that form queue 3 should now output to a Unix
command. Finally, the list command will create the Unix file '/file1'
with an image of the listing.

The following Pick/BASIC program creates a Unix file containing the text
'line 1'.

execute 'assignfq 0,ibm3151(cat>/file1)'
execute 'sp-assign f0'
execute '!rm /file1'; * Clear old one out
printer on; * Start printer output
print 'line 1'
execute '!ls -l /file1'
printer close; * Close output
execute '!ls -l /file1'
execute '!cat /file1'

The output of the program is:

Assigned form queue device 0, IBM3151(cat>/file1)
-rw-rw---- 1 pick pick 0 Apr 23 11:15 /file1
-rw-rw---- 1 pick pick 7 Apr 23 11:15 /file1
line 1

Special attention must be paid to the size of the Unix file. Note the size
printed on the Unix 'ls' command (0 and then 7). Even after the
'line 1' text has been printed, the Unix file size is still zero.
Only after the print file has been closed does the output appear in that file
(as shown by the new size of 7). Because of this buffering effect, printer jobs
must be closed before examining the Unix output.

See Also

Command Name Type Description
filename.devices Definition Contains terminal & printer device drivers.
tcl.assignfq.link Verb: Access

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.