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>nnetjsrv()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETJSRV()
 Sets or determines the target or the processing print server
------------------------------------------------------------------------------
 Syntax

     NNETJSRV(<cQueue>,<nJob>,[<cNewPServer>],[<cServer>|
        <nConId>]) --> cPServer

     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>.

     <cNewPServer>  Designates an optional parameter that contains a new
     target print server that is set for <nJob>.  If <nJob> is already in
     service on another print server, this parameter is meaningless.

     <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

     If <nJob> is not yet in service, NNETJSRV() returns the name of the new
     target print server.  If an error occurs or if no specific printer is
     set, the function returns an empty string.  With NNETERROR(), you can
     determine if an error occurred.

     If <nJob> is already in service, NNETJSRV() returns the name of the
     processing print server.

 Description

     NOVELL NET JOB SERVER
     The Queue Management System (QMS) allows you to set a target server for
     each print job.  If more than one print server has access to <cQueue>,
     you can define a specific print server for <nJob>.  To allow any print
     server to process <nJob>, an empty string must be passed for
     <cNewPServer>.  You can query the current target print server by calling
     NNETJSRV() without a value for <cNewPServer>.

     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; for
     example, the job with the highest priority in a queue is not
     automatically job number 1.  The job number must be determined with
     NNETCAPJOB() or NNETJLIST().

 Examples

     .  Query the target or the processing server for the first job in
        the queue LINEPRINTER:

        nJob=BIN2I(SUBSTR(NNETJLIST('LINEPRINTER'),5,2))
        ? NNETJSRV('LINEPRINTER', nJob)

     .  Set the target server for the first job in the queue
        LINEPRINTER to PSERVER:

        nJob=BIN2I(SUBSTR(NNETJLIST('LINEPRINTER'),5,2))
        ? NNETJPOINT('LINEPRINTER', nJob, 'PSERVER')

     .  Reset the target server for the first job in the queue
        LINEPRINTER:

        nJob=BIN2I(SUBSTR(NNETJLIST('LINEPRINTER'),5,2))
        ? NNETJSRV('LINEPRINTER', '')

     .  Wait until the first job in the queue LINEPRINTER is serviced,
        and then display the name of the processing server:

        nJob=BIN2I(SUBSTR(NNETJLIST('LINEPRINTER'),5,2))
        DO WHILE .NOT. NNETJWORK('LINEPRINTER', nJob)
        ENDDO
        ? NNETJSRV('LINEPRINTER', nJob)

See Also: NNETJWORK()

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