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> qjbusrhldget() / qjbusrhldset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 QJbUsrHldGet() / QJbUsrHldSet()
------------------------------------------------------------------------------
 Purpose:
 Set the specified job on user hold.

 Syntax:
 bResult = QJbUsrHldGet( dwQueueID, iJobNum )
 bResult = QJbUsrHldSet( dwQueueID, iJobNum, bHold )

 Parameters:
 dwQueueID  The print queue ID number.
 iJobNum    The print job number.
 bHoldFlag  Specifies whether to place the job on user hold - TRUE to
            place the job on hold and FALSE to remove the hold.

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 QJbUsrHldGet() returns TRUE if job iJobNum in print queue dwQueueID
 has been placed on user hold. Returns FALSE if not, or if an error occurs.

 QJbUsrHldSet() places job iJobNum on operator hold if called with
 bHoldFlag set to TRUE, and releases the job if set to FALSE. Returns the
 previous setting, or FALSE if an error occurs, in which case NWErrorGet()
 should be called to determine the error code.

 Example:
 // To determine whether job number 244 in print queue PRINTQ_1
 // has been placed on user hold:
 dwCurrQ = QueIDGet( "PRINTQ_1" )
 if ( dwCurrQ != NOVERRLONG )
    bHoldInd = QJbUsrHldGet( dwCurrQ, 244 )
    if ( NWErrorGet() = 0 )
       ? "Job 244 in PRINTQ_1 is "
       if (bHoldInd)
          ?? "on hold"
       else
          ?? "not on hold"
       endif
    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 user hold status the requesting user must either own the job or
 have queue operator rights. If FALSE is returned, check NWErrorGet().

See Also: QueIDGet() QJbOprHldGet() / QJbOprHldSet() QueQJbLst()

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