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

 Syntax:
 bResult= QJbRestartGet( dwQueueID, iJobNum )
 bResult= QJbRestartSet( 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).

 The CA-Clipper names for these functions are:
 QJbRstGet() / QJbRstSet()

 Description:
 QJbRestartGet() 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. QJbRestartGet() returns FALSE if the job
 will be cancelled in such an event.QJbRestartSet() 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 = QJbRestartGet( 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 = QJbRestartSet( 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 QueQJbList() function. If
 FALSE is returned, check NWErrorGet().

See Also: QueIDGet() QueQJbList() QueQJbDelete()

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