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> qjbrstget() / qjbrstset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 QJbRstGet() / QJbRstSet()
------------------------------------------------------------------------------
 Purpose:
 Get / set the job restart flag.

 Syntax:
 bResult= QJbRstGet( dwQueueID, iJobNum )
 bResult= QJbRstSet( dwQueueID, iJobNum, bNewFlag )

 Parameters:
 dwQueueID The print queue ID number.
 iJobNum   The print job number.
 bNewFlag  The new flag setting.

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 QJbRstGet() returns TRUE if print job number iJobNum being printed on
 the print queue specified by ID number dwQueueID will be restarted from
 the beginning if the print server aborts the job or goes down before the
 job has finished being printed. QJbRstGet() returns FALSE if the job
 will be cancelled in such an event.QJbRstSet() sets the job's restart
 flag to bNewFlag. If bNewFlag is set to TRUE, the job will restart if a
 print server problem occurs and if set to FALSE, the job is cancelled in
 the event of a problem.Returns FALSE and NWErrorGet() is set if an error
 occurs.

 Example:
 // To determine whether print job number 442 on print queue PRINTQ_1 will
 // be restarted if the print server goes down or aborts the job:
 bJobStart = QJbRstGet( QueIDGet( "PRINTQ_1" ), 442 )
 if( NWErrorGet() = 0 )
    if bJobStart
       ? "Print Job 442 will be restarted in the event"
    else
       ? "Print Job 442 will NOT be restarted in the event"
    endif
    ? "of a problem occurring with the print server"
 endif
 // To change the restart setting of print job 151 on print queue PRINTQ_0
 t// o make sure it restarts if the print server aborts the job:
 bJobStart = QJbRstSet( QueIDGet( "PRINTQ_0" ), 151, TRUE )
 if( NWErrorGet() = 0 )
    if bJobStart
       ? "Print Job 151 will be restarted in the event"
    else
       ? "Print Job 151 will NOT be restarted in the event"
    endif
    ? "of a problem occurring with the print server"
 endif

 Notes:
 The print queue ID number is obtained using the QueIDGet() function
 and print job numbers are obtained using the QueQJbLst() function. If
 FALSE is returned, check NWErrorGet().

See Also: QueIDGet() QueQJbLst() QueQJbDel()

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