Contains information about a given job in the queue and allows you to manipulate it.
Contains the connection ID of the client that submitted the job.
object.ClientConnectionId
Long.
Read-only.
This example contains the connection ID of the client that submitted the next job in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.ClientConnectionId)
Wend
Contains the task ID of the client that submitted the job.
object.ClientTaskId
Long.
Read-only.
This example contains the task ID of the client that submitted the next job in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.ClientTaskId)
Wend
Contains the creation date of the job.
object.CreationDate
Date.
Read-only.
This example contains the creation date of the next job in the queue Sample_Jib_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.CreationDate)
Wend
Sets or returns the description of the specified Job object.
object.Description[=Desc As String]
String.
Read/write.
Desc is an optional parameter that sets the description of the Job object.
This example returns the description of the next job in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.JobName & ": " & Job.Description)
Wend
Specifies whether or not the job is ready to be processed.
object.EntryOpen
Boolean.
Read-only.
When the job entry is created, this flag is set to indicate that the job has not yet been submitted. When the client submits the job, this flag is cleared.
This example intimates whether the job in the queue Sample_Job_Queue is ready for processing. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & " Entry Open " & Job.EntryOpen)
Wend
Sets or returns the name of a file that corresponds to the specified Job object.
object.FileName
String.
Read-only.
This example returns the name of the file that corresponds to the next job in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Print("A List of Job Files")
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName)
Wend
Returns the File I/O object that corresponds to the specified job. This can be used to read the data from–or write it to–the job file.
object.JobFile
File.
Read-only.
This example returns the File I/O object that corresponds to the specified job present in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Set Job = Jobs.Element(JobNumber)
JobFile = Job.JobFile
Sets or returns the name of a job.
object.JobName[=JobName As String]
String.
Read/write.
JobName is an optional parameter that sets the name of a job.
This example returns the name of the jobs queued in the Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Print("A List of Job Names")
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.JobName)
Wend
Returns the job number of the specified Job object.
object.JobNumber
Long.
Read-only.
This example returns the job number of the next job in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.JobNumber)
Wend
Sets or returns the ID of the job server.
object.JobServerId[= Value As Long]
Long.
Read/write.
Value is an optional parameter that sets the ID of the job server.
This example returns the ID of the job server. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.JobServerId)
Wend
Contains the task ID of the job server.
object.JobServerTaskId
Long.
Read-only.
This example returns the task ID of the job server. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.JobServerTaskId)
Wend
Returns the size of the specified Job object, in bytes.
object.JobSize
Long.
Read-only.
This example returns the size (Bytes) of the next job in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.JobSize)
Wend
Sets or returns the type of the specified Job object.
object.JobType[=JobType As Long]
Long.
Read-only.
JobType is an optional parameter that sets the type of the specified job.
The JobType value depends on the job server and client. JobType is a number that tells the job server what type of job is represented by the job entry. A job server can request specific job types from a queue when making a request to service a job. The JobType is a value agreed upon by the client and the job server. For example, JobType could be used to signal which paper tray to use in a printer.
This example returns the type of the next job in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.JobType)
Wend
Specifies whether or not the job will be processed, as specified by an operator.
object.OperatorHold
Boolean.
Read-only.
If the flag is set, the job will not be processed until the flag is cleared, but the job continues to advance toward the front of the queue. Only operators can modify this flag.
This example returns the operator hold value corresponding to the job processing status in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & " Operator hold: " & Job.OperatorHold)
Wend
Sets or returns the position of the job in the queue.
object.Position[=JobPosition As Long]
Long.
Read/write.
JobPosition is an optional parameter that sets the position of the job in the queue.
This example returns the position of the job in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.Position)
Wend
Contains the ID of the queue to which the specified job belongs.
object.QueueId
Long.
Read-only.
This example returns the queueID of the next job.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & ": " & Job.QueueId)
Wend
Specifies how to handle the job if the client loses its connection before submitting the job.
object.ServiceAutostart
Boolean.
Read-only.
If this bit is set, the job is serviced after the connection of the queue server is broken, even if the client has not cleared the EntryOpen bit. If the EntryOpen bit is cleared when a server connection is broken, queue management system (QMS) removes the job from the queue.
This example prints the current value of ServiceAutostart.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & " Service Autostart " & Job.ServiceAutostart)
Wend
Specifies how to handle the job if the queue server fails during processing.
object.ServiceRestart
Boolean.
Read-only.
The job remains in the queue (in its current position) when a queue server fails. If this bit is cleared, queue management system (QMS) removes the job from the queue when a server fails.
This example prints the current value of ServiceRestart.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & " Service Restart " & Job.ServiceRestart)
Wend
Specifies whether or not the job will be processed, as specified by a user.
object.UserHold
Boolean.
Read-only.
If the flag is set, the job will not be processed until the flag is cleared. However, the job will continue to advance toward the front of the queue. An operator (or the client who submitted the job) can modify this flag.
This example contains the current value of the UserHold property.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Jobs.Reset
While(Jobs.HasMoreElements)
Set Job=Jobs.Next
print(Job.FileName & " User hold: " & Job.UserHold)
Wend
Closes an open job and removes it from the queue.
object.Close()
None.
Boolean. Returns TRUE if successful; otherwise, FALSE.
This example closes the job that was open (notice the Open method two lines before) and removes it from the queue in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Set Job=Jobs.Open(jobType)
print(Job.JobName)
Job.Close
Posts the current job for the service.
object.Post()
None.
Boolean. Returns TRUE if successful; otherwise, FALSE.
This method must be called after the Create method.
This example posts the current job for the service. Notice that Post is not called until after Create has been called.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Job=Jobs.Create
Job.Post
Updates the changes of the actual job queue entry.
object.Update()
None.
Boolean. Returns TRUE if successful; otherwise, FALSE.
This example updates the changes of the actual job queue entry in the queue in the queue Sample_Job_Queue. Ensure that the specified queue is existing.
Set Queue = CreateObject("ucx:Queue")
Queue.Name = "Sample_Job_Queue"
Set Jobs = Queue.Jobs
Set Job=Jobs.Element(jobNumber)
job.description = "This description is being set through NSN"
job.Update
Job.Close