JobStruct

Contains job control information for queues.

Syntax (prior to NetWare 3.x)

Offset

Content

Type

0

ClientStation

byte

1

ClientTaskNumber

byte

2

ClientIDNumber

long (Hi-Lo)

6

TargetServerIDNumber

long (Hi-Lo)

10

TargetExecutionTime

byte[6]

16

JobEntryTime

byte[6]

22

JobNumber

word (Hi-Lo)

24

JobType

word (Hi-Lo)

26

JobPosition

byte

27

JobFileName

byte[14]

42

JobFileHandle

byte

48

ServerStation

byte

49

ServerTaskNumber

byte

50

ServerIDNumber

long (Hi-Lo)

54

TextJobDescription

byte[50]

104

ClientRecordArea

byte[152]

Syntax (NetWare 3.x and later)

Offset

Content

Type

0

RecordInUse

word (Lo-Hi)

2

PreviousRecord

long (Lo-Hi)

6

NextRecord

long (Lo-Hi)

10

ClientStation

long (Lo-Hi)

14

ClientTaskNumber

long (Lo-Hi)

18

ClientIDNumber

long (Hi-Lo)

22

TargetServerIDNumber

long (Hi-Lo)

26

TargetExecutionTime

byte[6]

32

JobEntryTime

byte[6]

38

JobNumber

word (Lo-Hi)

42

JobType

word (Lo-Hi)

44

JobPosition

word (Lo-Hi)

46

JobControlFlags

word (Lo-Hi)

48

JobFileName

byte[14]

62

JobFileHandle

long (Hi-Lo)

66

ServerStation

long (Lo-Hi)

70

ServerTaskNumber

long (Lo-Hi)

74

ServerIDNumber

long (Hi-Lo)

78

TextJobDescription

byte[50]

128

ClientRecordArea

byte[152]

Parameters

RecordInUse

(NetWare 3.0 and later) Specifies whether the record is in use.

PreviousRecord

(NetWare 3.0 and later) Points to the previous record.

NextRecord

(NetWare 3.0 and later) Points to the next record.

ClientStation

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

ClientTaskNumber

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

ClientIDNumber

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.

TargetExecutionTime

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

JobEntryTime

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

JobNumber

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

JobType

Specifies the type of job represented by the queue entry.

JobPosition

Specifies the job's position within the queue.

JobControlFlags

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.

JobFileName

Specifies the name of the file (in DOS 8.3 format) that holds data associated with the queue entry.

JobFileHandle

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.

ServerStation

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

ServerTaskNumber

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

ServerIDNumber

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

TextJobDescription

Specifies a NULL-terminated ASCII text description of the contents or purpose of the job, which can be displayed by QMS as part of the job description.

ClientRecordArea

Specifies supplementary information that can be exchanged between the queue client and the queue server.

Remarks

A queue can hold from 0 to 250 jobs. Jobs are numbered from 1 to 999.

A queue can be serviced by as many as 25 job servers.

The job structure for NetWare versions prior to 3.x has a fixed length of 256 bytes.

When a new job is placed in a queue, the file server automatically creates a file for this station and gives the station read and write access to the file. The queue management process in that file server sets the ClientStation field.

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 job types. Then a queue can be used to hold entries for job requiring different types of service. JobType must be supplied by the client that created the queue job. Do not use -1 as the job 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 JobFileHandle to a DOS file. Applications can then use standard DOS requests to access the job file. JobFileHandle is set by QMS.