Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_qjget( <cqueue>, <njobid>, http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_QJGET( <cQueue>, <nJobID>, 
         <cAttribute1> | <nAttribute1> [, @<Memvar1>
      [, <cAttribute2> | <nAttribute2>, @<Memvar2>... ] ] )
-- or --
N_QJGET( <cQueue>, <nJobID>, <aAttribute>, <aSetting> )


Parameters

<cQueue>
Name of the print queue. The name of the print queue can be prefixed 
with the name of a server:

cQueue = 'FS2\LASER2'

NetLib will remember the argument to <cQueue> specified in the last 
call to one of the N_QJ* functions. You can then pass NIL as the 
argument, and NetLib will assume you mean the same queue as before. 
Thus this sequence is permissible:

N_QJGET('FS1\PRINTQ_0', nJob, ...)
N_QJSET( , nJob, ...)

<nJobID>
Job ID number.

<cAttribute> -- or -- <nAttribute>
Attribute to read. May be passed as a text string or as a numeric 
value. See the table below for a list of print job attributes.

@<Memvar>
Optional memory variable to receive the information.

<aAttribute>
An array containing the names or numbers of the attributes you wish to 
read. This is an alternative to passing a series of attribute/memory 
variable pairs.

<aSetting>
An array to receive information for the attributes listed in the 
corresponding array <aAttribute>.

The number of elements in <aSetting> must be equal to or greater than 
the number of elements in <aAttribute>, or trailing values will be 
lost. For example, if <aAttribute> has ten elements and <aSetting> has 
only seven, then attributes eight, nine, and ten will not be stored in 
the receiving array.

Clipper 5.x  If <aSetting> is initialized to zero elements, the 
function will automatically set it to the correct resize.


Returns

The value of the last or only attibute in the list. It is possible to 
call the function with only three Parameters, omitting @<Memvar>, and 
obtain the information as the return value.


Description

Stores information about the specified job into memory variables. You 
can include as many attribute/memory variable pairs as needed. Reading 
several attributes in a single call is more efficient than repeated 
calls to N_QJGET().

Print job attributes may be specified by text name or by attribute 
number. Attribute numbers are defined as manifest constants in 
QUEUE.CH. Using numbers or constants will give slightly better 
performance than using names.

Text          #define             Attribute
BANNER        QJ_BANNER           Print banner
BYTES         QJ_BYTES            Job File size
CLIENT        QJ_CLIENT           User ID submitting job
COPIES        QJ_COPIES           # of Copies
CPL           QJ_CPL              Characters per line
CRA           QJ_CRA              Client record area
DESCRIPTION   QJ_DESCRIPTION      Job Description
EDATE         QJ_EDATE            Entry date
ETIME         QJ_ETIME            Entry time
FORMNO        QJ_FORMNO           Form type (class)
LPP           QJ_LPP              Lines per page
NOFF          QJ_NOFF             Suppress form feed
NOTIFY        QJ_NOTIFY           Print notify
ORDER         QJ_ORDER            Order in queue
SERVER        QJ_SERVER           Print server
STATION       QJ_STATION          Client station number
STATUS        QJ_STATUS           Job status
TABS          QJ_TABS             Tab expansion count
USER          QJ_USER             Banner user name
XDATE         QJ_XDATE            Target execution date
XTIME         QJ_XTIME            Target execution time

The data types and meanings of the attributes are given below.

BANNER
String. Text for banner page. Maximum of 12 characters, including 
spaces, all uppercase. A null string means that a banner page will not 
be printed.

BYTES
Numeric. Size of the job in bytes. If the job calls for multiple 
copies, the size of a single copy. The size does not include the banner 
page, if any, or trailing form feed, if enabled.

CLIENT
String. Login name of the user who place the job in the queue. 

COPIES
Numeric (1- 99). The number of copies that will be printed.

CPL
Numeric. The maximum number of characters per line of the printed page.

CRA
Character. Client Record Area. Useful only for those intimately 
familiar with the NetWare Queue Management System.

DESCRIPTION
String. Text describing the nature of the job

EDATE
Date. Queue entry date.

ETIME
String. Time this job was placed in the queue, formatted as "HH:MM:SS".

FORMNO
Numeric. Also referred to as Print Class or Form Type. Required form 
for the job.

LPP
Numeric. The maximum number of lines per page.

NOFF
Logical. False is the normal setting and means that NetWare will 
generate a page eject at the end of each print job. (This is in 
addition to any page ejects contained in the job itself.) A setting of 
true means no trailing form feed-that is, NetWare will not generate a 
page eject at the end of each print job.

NOTIFY
Logical. True means that the user will be notified on completion of a
print job.

ORDER
Numeric. Order of the job in the queue.

SERVER
String. Name of the print server currently servicing this job. If 
blank, then this job is not currently being serviced.

STATION
Numeric. Connection number that put this job in the queue.

STATUS
String. Contains one of the following codes:

Literal       #define             Meaning
A             QJ_ACTIVE           Active (printing)
B             QJ_BOTH_HOLD        Both hold (operator and user)
C             QJ_CAPTURE          Being captured (not yet queued)
D             QJ_DEFERRED         Deferred (See XTIME and XDATE.)
O             QJ_OPER_HOLD        Operator hold
R             QJ_READY            Ready (waiting to print)
U             QJ_USER_HOLD        User hold

A hold status takes precedence over deferred.

TABS
Numeric. Number of spaces that will be substituted for each tab 
character (I or ASCII 9). Zero means that there will be no tab 
expansion.

USER
String (1-12 characters). User name that will appear on the banner 
page, in addition to banner text, if a banner page is generated.

XDATE
Date. Target execution date. If blank, then the job will be a candidate 
for printing as soon as it reaches the front of the queue.

XTIME
String. Target execution time, formatted as "HH:MM:SS".  If blank, then 
the job will be a candidate for printing as soon as it reaches the 
front of the queue.


Examples

LOCAL aJobs := {}, aAttribute[3], aSetting[3]
LOCAL cBanner :=  nForm := cStatus := NIL
N_QJLIST('printq_q', aJobs)   // job list (Clipper 5.x)

// Multiple calls
cBanner = N_QJGET('printq_q', aJobs[1], 'BANNER')
nForm = N_QJGET('printq_q', aJobs[1], 'FORMNO')
cStatus = N_QJGET('printq_q', aJobs[1], 'STATUS')

// Using text names
N_QJGET('printq_q', aJobs[1],   ;
        'BANNER', @cBanner,     ;
        'FORMNO', @nForm,       ;
        'STATUS', @cStatus      )

// Using numbers
#include 'QUEUE.CH'
N_QJGET('printq_q', aJobs[1]),   ;
        QJ_BANNER, @cBanner,     ;
        QJ_FORMNO, @nForm,       ;
        QJ_STATUS, @cStatus      )

// Using arrays
#include 'QUEUE.CH'
aAttribute[1] = QJ_BANNER
aAttribute[2] = QJ_FORMNO
aAttribute[3] = QJ_STATUS
N_QJGET('printq_q', aJobs[1], aAttribute, aSetting)


Files

QUEUE.CH



See Also: N_CAPGET() N_QJLIST() N_QJSET()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson