Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> qjbposget() / qjbposset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 QJbPosGet() / QJbPosSet()
------------------------------------------------------------------------------
 Purpose:
 Get / set the position of a job in the queue.

 Syntax:
 iPosition = QJbPosGet( dwQueueID, iJobNum )
 iPosition = QJbPosSet( dwQueueID, iJobNum, iNewPos )

 Parameters:
 dwQueueID The print queue ID number.
 iJobNum   The print job number.
 iNewPos   The new job position number.

 Returns:
 A numeric value (signed short int).

 Description:
 QJbPosGet() returns the position of job number iJobNum in the print
 queue specified by ID number dwQueueID, and NOVERRINT if an error
 occurs.

 QJbPosSet() sets the position of job iJobNum to iNewPos in the queue
 specified by dwQueueID. Setting iNewPos to 1 moves the job to the beginning
 of the queue and setting iNewPos to a number greater than the number of
 jobs in the queue moves it to the end. Returns the previous position of the
 job, or NOVERRINT if an error occurs.

 Example:
 // To display the position of job number 244 in print queue PRINTQ_1:
 dwCurrQ = QueIDGet( "PRINTQ_1" )
 if ( dwCurrQ != NOVERRLONG )
    iCurrPos = QJbPosGet( dwCurrQ, 244 )
    if ( iCurrPos != NOVERRINT )
       ? "Job 244 is at position", iCurrPos," in queue PRINTQ_1"
    endif
 endif
 //To move job number 244 to the beginning of print queue PRINTQ_1:
 dwCurrQ = QueIDGet( "PRINTQ_1" )
 if ( dwCurrQ != NOVERRLONG )
    if ( QJbPosSet( dwCurrQ, 244 , 1 ) != NOVERRINT )
       ? "Job 244 is now at the front of PRINTQ_1"
    endif
 endif

 Notes:
 The print queue ID number is obtained using the QueIDGet() function
 and print job numbers are obtained using the QueQJbLst() function. To
 change the position number of a job, the requesting user must have queue
 operator rights.

See Also: QueIDGet() QueQJbLst()

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