Dec 122017
 
Retrieve print queue info from Clipper.
File QUEUE.ZIP from The Programmer’s Corner in
Category Dbase Source Code
Retrieve print queue info from Clipper.
File Name File Size Zip Size Zip Type
QUEUE.BIN 396 384 deflated
QUEUE.DOC 7639 2529 deflated
QUEUE.OBJ 580 516 deflated
SHOWQ.PRG 4430 1462 deflated
SYNUTILS.DOC 4549 2319 deflated

Download File QUEUE.ZIP Here

Contents of the QUEUE.DOC file



QUEUE

Version:

1.1

Assembly date:

9/26/87

Environments:

BIN version works with Quicksilver, FoxBASE+, dBASE III Plus
OBJ version works with Quicksilver and Clipper

Requirements:

o DOS 3.0 or greater.
o PRINT.COM must be loaded.

QUEUE will return an error code if either of these conditions are not met
(see below).

General Description:

QUEUE communicates with the DOS print queue (loaded with PRINT.COM). To find
out how to install this print queue, refer to your DOS manual (3.0 or greater).

QUEUE calls DOS's "multiplex interrupt" (INT 2fh) with the code for
PRINT.COM communication and with the service you request.


Syntax:


mstrvar = service + " " [+ filespecname|return area]

The service requested is passed as an ASCII digit. If a filespec is
specified, at least one space must separate the service from the filespec
(examples below).

CALL (CCALL) QUEUE WITH mstrvar

Return values are presented in the discussions of each function below.

For a further explanation of CALL/CCALL usage, see SYNUTILS.DOC, which should
have been included in the ARChive with this file.
-- 1 --



QUEUE



Examples:



Function 0: GET INSTALL STATUS

Example:


m="0"

[C]CALL QUEUE WITH m

DO CASE
CASE ASC(m) = 1
?"You cannot use this program without DOS 3.x or better"
* note that this error can occur with any function
CASE ASC(m)=255
?"Print queue is installed"
CASE ASC(m)=32
?"Print queue is not installed, but may be if you wish"
CASE ASC(m)=33
?"Print queue is not installed, conflict with another program detected"
ENDCASE


Function 1: SUBMIT FILE

Example:

This submits a file called \mydir\foo.bar (no wildcards) to the queue:

m = "1 \mydir\foo.bar"
[C]CALL QUEUE WITH m

(no return code -- you can use function 8 to confirm success)

Function 2: CANCEL FILESPEC

Example:

This cancels ????????.asm from queue--wildcards ok, but with a catch--I can
only get the ? wildcard to work, not * (this with DOS 3.30):

m = "2 ????????.asm"
[C]CALL QUEUE WITH m

(no return code -- you can use function 8 to confirm success)

-- 2 --


QUEUE


Function 3: CANCEL ALL FILES

Example:


m = "3"
[C]CALL QUEUE WITH m
(no return -- use function 6 to confirm)

Function 4: PAUSE PRINTING

Example:


m = "4"
[C]CALL QUEUE WITH m
(no return)

Function 5: RESTART PRINTING

Example:


m = "5"
[C]CALL QUEUE WITH m
(no return)


Function 6: GET CURRENT FILE

Example:


m = "6" + SPAC(63) && maximum length is 64 bytes, better make room 'cause
&& otherwise you may have other memvars overwritten when
CALL QUEUE WITH m && the current file's name is copied in...
IF LEFT(m,1)="-" && error return for this call is "-"
?"no files in cue"
ELSE
?"Currently printing file " + m
ENDIF

Function 7: GET PRINT STATUS

Example:


m = "7"
CALL QUEUE WITH m
IF m="0"
?"No errors detected"
ELSE
?"Errors on list device indicate that it"
?"may be off-line. Please check it."
ENDIF
-- 3 --


QUEUE



Function 8: CONFIRM FILE

Example:

m="8 \debase\dbase.exe"
CALL QUEUE WITH M

IF m="0"
?"That file is not in the queue"
ELSE
?"\debase\dbase.exe is in the print queue"
ENDIF
* Your filespec will be uppercased by QUEUE. No wildcards are allowed, and
* pathname * must be exactly the same as that submitted. If you RUN PRINT
* , * the drive and path must be specified in your search filename
* (see below).

______________________________________________________________________________
______________________________________________________________________________

Error returns:

ASC(passed param) will be 1 if the DOS level is less than 3.
This is the case even where it is stated above that there is no
return value. Note that there is no way of retrieving the returned
value if you pass a literal string, as in some of the examples above.
This should not matter if you issue a GET INSTALL STATUS first.

"PRINT not installed" error codes (ASC(m) = 20 or 21) are *only*
returned from function 0 (see above). Therefore it is up to the
programmer to make sure that PRINT is installed before requesting
other services.

______________________________________________________________________________
______________________________________________________________________________

Notes on PRINT usage:


It's all in your DOS manual, but make sure you do not RUN PRINT for the
first time from inside deBASE. You must start it before dBASE, FoxBASE,
or your compiled application loads, as it is a TSR ("terminate-stay-resident"
program).
______________________________________________________________________________


-- 4 --


QUEUE



Miscellaneous:


If you RUN PRINT *.PRG, the drive and subdirectory will be appended to
each file name. On the other hand, files submitted with QUEUE are found
in the queue in the same form they were submitted, i.e., with or without
the drive and/or subdirectory, exactly as they were specified. Evidently
the non-resident portion of PRINT handles affixing of the drive and
subdirectory.

Function 2f handling by the resident portion of PRINT is buggy. I've already
reported some of the bugs to IBM. Also, I have only tested this with DOS 3.3.
I welcome your reports of problems with the program, and will fix
them||gripe to IBM, whichever is appropriate. The doc on error returns is
really deficient, I'm trying to get more info, but as far as I can see it just
doesn't work reliably with 3.3, so I didn't incorporate it.

R. Russell Freeland
Synergy Corp.
CIS 76146,371
1780 SW 43 Ave.
Ft. Lauderdale FL, 33317
voice:305/792-1866

Enjoy!
-- 5 --



 December 12, 2017  Add comments

Leave a Reply