Service Queue Job By Form List 0x2222 23 138

Retrieves a job for servicing.

NetWare Server:4.x, 5.x

Request Format

Offset

Content

Type

Request header

6

FunctionCode (23)

byte

7

SubFuncStrucLen (11)

word (Hi-Lo)

9

SubFuncCode (138)

byte

10

QueueID

long (Hi-Lo)

14

FormTypeCnt

long (Lo-Hi)

18

FormTypeList

word[FormTypeCnt] (Lo-Hi)

Reply Format

Offset

Content

Type

Reply header

8

QRecordInUse

word (Lo-Hi)

10

QPreviousRecord

long (Lo-Hi)

14

QNextRecord

long (Lo-Hi)

18

QStation

long (Lo-Hi)

22

QTask

long (Lo-Hi)

26

QUserID

long (Hi-Lo)

30

TargetServerID

long (Hi-Lo)

34

TargetTime[6]

byte[6]

40

QEntryTime[6]

byte[6]

46

QJobNumber

long (Lo-Hi)

50

QEntryType

word (Lo-Hi)

52

QOrder

word (Lo-Hi)

54

QFlags

word (Lo-Hi)

56

QFileName

byte[14]

70

QFileHandle

long (Lo-Hi)

74

QServerStation

long (Lo-Hi)

78

QServerTask

long (Lo-Hi)

82

QServerID

long (Hi-Lo)

Parameters

QRecordInUse

Specifies whether the record is in use.

QPreviousRecord

Points to the previous record.

QNextRecord

Points to the next record.

QStation

Specifies the connection number of the station that placed the job in the queue.

QTask

Specifies the number of the task that was active when the job was placed in the queue, as filled by QMS.

QUserID

Specifies the object ID number of the user that is logged in to the station making the queue entry, as filled in by QMS.

TargetServerID

Specifies the ID number of the server that the client specifies to service this entry.

TargetTime

Specifies the earliest time that the queue client is willing to have the job serviced (year, month, day, hour, minute, second or 0xFFFFFFFF for the first opportunity).

QEntryTime

Specifies the time that the job entered the queue, as filled in by QMS (year, month, day, hour, minute, and second from the server's system clock).

QJobNumber

Specifies the unique number that servers or clients can use when referring this queue entry, as assigned by WMS when the job is created.

QEntryType

Specifies the type of job represented by the queue entry.

QOrder

Specifies the job's position within the queue.

QFlags

Specifies the current status of the job:

0x08

The queue job should automatically be started even if the client's connection is broken (the station is turned off or the client is logged out) and before the client signals that the job is ready to be queued. If this bit is cleared, the job will be removed from the queue if the creating station destroys its connection with the file server before signalling that the entry is ready for service. If this bit is set, the job will automatically be marked ready for service when a station's connection is lost. This bit can be set or cleared by the client that created the entry or by an operator.

0x10

The queue entry is to be reserviced if the server fails. A server can indicate that it was unable to finish servicing a job and has aborted service. Also, servers that break their connection with the file server without signaling successful completion of service on outstanding jobs are assumed to have aborted service on those jobs. If service is aborted for an entry that has this bit set, the entry will remain in its same position in the service queue and will be readied for reservice at a later time. If service is aborted for an entry that has this bit cleared, the entry will be removed from the queue and will not be reserviced. This bit can be set or cleared by the client that created the entry or by an operator.

0x20

When an entry is first created, this bit is set to indicate that the file associated with the entry has not yet been closed by the client. When the client indicates that it has finished preparing the queue entry and the queue file, the file is closed and this bit is cleared. This bit is managed by QMS.

0x40

This bit is set if the entry has been placed on hold by the client that created the entry. Jobs placed on hold continue to advance toward the front of the queue, but they will not be serviced until the hold bit has been cleared. This bit can be set or cleared by the client that created the entry or by an operator.

0x80

This bit is set if the entry has been placed on hold by an operator. Jobs placed on hold continue to advance towards the front of the queue, but they will not be serviced until the hold bit has been cleared. This bit can be set or cleared only by an operator.

QFileName

Specifies the name of the file that holds data associated with the queue entry.

QFileHandle

Specifies the file handle (in standard NetWare format) that a job client or job server can use to access the file associated with an opened job.

QServerStation

Specifies the station number of the queue server that is servicing the job, as maintained by QMS.

QServerTask

Specifies the task number of the queue server that is servicing the job, as maintained by QMS.

QServerID

Specifies the ID number of the queue server that is servicing the job, as maintained by QMS.

Return Values

Decimal

Hex

Description

0

0x00

Successful

126

0x7E

Bad Length

255

0xFF

Failure

Remarks

The server specifies the job queue and the entry type list that it wants to service. If the server is attached to the target queue and the queue has one or more jobs that match the requirements, the first such job in the queue is given to the calling server and the file associated with the queue entry is automatically opened.

Set TargetServerID to -1L if this entry can be serviced by any server. If the specified server is not authorized to service the queue, the job is rejected. TargetServerID must be supplied by the client that created the queue job.

A server can specify that it will service only the entries for particular types. Then a queue can be used to hold entries for job requiring different types of service. QEntryType must be supplied by the client that created the queue job. Do not use -1 as the entry type.

The first job will be placed at the head of the queue and will be assigned position number 1; the second job will be placed behind the first job and will be assigned position number 2, etc. As jobs are removed from the queue, the position numbers of the remaining jobs are updated to reflect their changing position within the queue. The job position number is assigned and maintained by QMS.

When a client creates a queue entry, QMS creates a file with a unique name in the queue directory and grants the queue read and write access to the file.

NetWare shells provide hooks to allow applications to open the special NETQ device after opening a queue job to attach the file handle specified by QFileHandle to a DOS file. Applications can then use standard DOS requests to access the job file. QFileHandle is set by QMS.

See Also

Get Queue Job List 0x2222 23 129, Get Queue Job List (old) 0x2222 23 107, Get Queue Jobs From Form List 0x2222 23 137