[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FN_ABQJBFI()
Abort servicing queue job and file
------------------------------------------------------------------------------
Syntax
fn_abQJbFi()( <nQueueID>, <nJob>, <nHandle> ) -> lSuccess
Arguments
<nQueueID> is the bindery object ID of the queue
<nJob> is the job number the server wants to abort
<nHandle> is the DOS file handle returned from fn_sQJobFi()
Returns
<lSuccess>, .t. if the call succeeds. If it doesn't, check
fn_error() for one of the following error codes:
150 = Server out of memory
208 = Queue Error
209 = No queue
214 = No job rights
217 = Station is not a server
Description
This call is made by queue servers, and only if they have
already obtained a job for servicing.
This closes the job file and deletes it from the job queue
if the restart flag was not set. If the restart flag was
set, the job remains at the beginning of the queue.
You might not want to abort queue jobs just because the job
was not submitted properly, unless you're sure the job will
be deleted from the queue. Otherwise, it'll stay there and
the next time you try to service a job, you'll get the same
one back. If you want to finish a job and be sure it gets
deleted, use fn_finsqjb().
Examples
// This example assumes a lot has been set up.
// Just pay attention to the abort logic.
local aJobStruct
aJobStruct := fn_sQJobFi( nID, -1, @nHandle )
if !empty( aJobStruct )
if fatalErr() // determine that server must fatal exit, so:
fn_abqjbfi( nID, aJobStruct[ QJ_JOB_NUMBER ], nHandle )
fatal()
else // finish normally
fn_finsqjb( nID, aJobStruct[ QJ_JOB_NUMBER ], nHandle )
endif
endif
Source: N:\SRC\QMS\ABORTSVC.PRG
Author: Glenn Scott
See Also:
fn_finsqjb()
fn_sqjbfi()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson