[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
OVERVIEW
Design Philosphy of Clipper APIs to access QMS
------------------------------------------------------------------------------
Syntax
Arguments
Returns
Description
The goal of this Clipper API is to provide as much access
to the QMS (Queue Management System) APIs as possible,
while trying to make all the data available in a Clipper-esque
way. For example, where Novell says a date is a 3 byte string
for month, day, and year, we want to use a Clipper date type
instead.
Queue jobs reside in queues, and every queue job has a set
of attributes which Novell calls the Job Entry Structure.
These attributes include numeric things like "job number"
and "target server ID" as well as character things like
"Job Description" and "Client Record Area."
We have therefore created an entity called a JOBSTRUCT which
is a Clipper array. Right now this array has 23 elements.
Each of the elements has a #define associated with it in
netto.CH, with the prefix QJ (queue job, I guess).
Therefore, we know that in any JOBSTRUCT aJob, aJob[ QJ_CLIENT_ID ]
gives you the Client ID, etc.
The JOBSTRUCT is not in a format the Novell NetWare will ever
understand. It is what I call "fully translated", meaning, you
and I and Clipper can make sense of it.
In order to create a jobstruct, I have defined a command in
netto.CH called CREATE JOBSTRUCT. Using this, you can very,
very easily create the JOBSTRUCT array.
Once you have our JOBSTRUCT, you can pass it to any routine
that requires a JOBSTRUCT, such as fn_crqJbFi() (Create Queue
Job and File).
Those routines will call some "internals" that convert the
array to a big long character string that NetWare wants to
see.
If a routine _returns_ a JOBSTRUCT, then the reverse is
happening: NetWare returns a big long character string that
is parsed and translated into a JOBSTRUCT we all prefer.
<describe the parts of the JOBSTRUCT>
<describe QMS in general?>
<rough Queue Q&As>
Q: How do I get a list of print queues on all servers?
A: First, you use fn_pfConID() to save the current preferred
connection ID (server connection). Then, you fn_sPfCID()
to set the preferred connection ID to one of the other
connections (1-8).
For each of these other connections, call Scan Bindery
Object [ fn_scaBndO() ] searching for print queues
(object type OT_PRINT_QUEUE). When you're all done,
reset the preferred connection ID back to the original.
Better yet, write this as a high level function and submit
it for the next release of this library.
Examples
Source: N:\SRC\QMS\CRQJBFI.PRG
Author: Glenn Scott and Chris Boduch
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson