Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnetjflags()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETJFLAGS()
 Reads and sets the job control flag
------------------------------------------------------------------------------
 Syntax

     NNETJFLAGS(<cQueue>,<nJob>,[<nNewFlags>],[<cServer>|
        <nConId>]) --> nFlags

     Netware: 2.2 and 3.11

 Arguments

     <cQueue>  Designates the name of the print queue that is accessed.

     <nJob>  Designates the job number of the job that is processed in
     <cQueue>.

     <nNewFlags>  Designates an optional parameter that contains a bit-
     coded value to change the control flags of <nJob> in <cQueue>.  The
     definition of the bits can be seen in table below.  To set multiple
     bits, the decimal values of the attributes must be added.

     <cServer>  Designates the name of the file server on which <cQueue>
     is processed.  Your workstation must be attached to <cServer>.

     <nConId>  Designates the connection ID of your workstation on
     <cServer>.

 Returns

     NNETJFLAGS() returns a numeric value that contains the job flags.  The
     flags correspond to a bit position within this value.

     Table 25.1:  Coding of Job Control Flags
     ------------------------------------------------------------------------
     Bit     Value     Definition
     ------------------------------------------------------------------------
     4       8         Service autostart flag
     5       16        Service restart flag.  When this flag is set, a job
                       that is canceled by a job server remains in the queue.
                       Otherwise, the job is deleted from the queue.
     6       32        Entry open flag.  This bit indicates that a job has not
                       been released by a user and therefore is not ready for
                       servicing.
     7       64        User hold flag.  The job remains in the queue without
                       being serviced until the user or the queue operator
                       clears this flag.
     8       128       Operator hold flag.  The job remains in the queue
                       without being serviced until a queue operator clears
                       this flag.
     ------------------------------------------------------------------------

     If an error occurs (for example, if <cQueue> does not exist), the
     function returns -1.

 Description

     NOVELL NET JOB FLAGS
     Job control flags can provide important information about <nJob>.  The
     required job is specified by its job number.  The job number has nothing
     to do with the logical position of a job within a queue.  The job number
     can be determined with NNETCAPJOB() or NNETJLIST().

     With NNETJFLAGS() you can determine if a job is ready for processing or
     if the user has not yet closed the job (entry open flag).  You can see
     if a job is in waiting state (user or operator hold flag).  By passing
     <nNewFlags>, one or more flags can be set or deleted.  For example, a
     job can be set into a waiting state with the user hold flag.

 Notes

     .  The reading of the job control flags requires that the
        requesting user has access to <cQueue> as a user or a queue operator.

     .  Netware does not prevent a user who has created a job from
        changing the operator hold flag.  Therefore, it does not make sense
        to differentiate between a user and an operator hold flag when using
        NNETJFLAGS().  A difference between these two flags can arise in an
        application specific interpretation, like the one that is implemented
        in the Novell utility PCONSOLE.

     .  A job that is already in progress cannot be modified.

 Examples

     .  Check to see if job 1 in the queue LINEPRINTER has already
        been closed by the user::

        nJob=BIN2I(LEFT(NNETJLIST('LINEPRINTER'),2))
        IF ISBIT(NNETJFLAGS('LINEPRINTER',nJob),6)
        ? 'Job closed!'
        ELSE
        ? 'Job not ready!'
        ENDIF

     .  Start the capture mode for LPT1, send output in the queue
        LINEPRINTER, and set the user hold flag:

        NNETCAPSSF(1)
        NNETCAPBEG(1)
        NNETSETQ(1,'LINEPRINTER')
        SET PRINTER ON
        ? 'Hello'
        nJob=NNETCAPJOB(1)
        nOldFlags=NNETJFLAGS('LINEPRINTER',nJob)
        nNewFlags=NUMAND(nOldFlags,64)
        NNETJFLAGS('LINEPRINTER',nJob,nNewFlags)
        NNETCAPFLU(1)

     .  The new job is always created at the first output (? "Hello"),
        not by calling NNETCAPBEG().  Therefore, NNETJFLAGS() must be called
        after the first output.  If NNETJFLAGS() is not called after the
        first output, NNETCAPJOB() returns the number of the previous capture
        job and the job control flags are modified for the wrong job.

See Also: NNETCAPJOB() NNETJLIST()

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