7.2 Queue Object

Features:

7.2.1 Jobs property

Lists the collection of jobs in a queue.

Syntax

object.Jobs

Type

Jobs.

Attributes

Read-only.

Example

This example lists the collection of jobs 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

7.2.2 Name property

Returns or sets a queue name.

Syntax

object.Name[=Queuename As String]

Type

String.

Attributes

Read/write.

Remarks

Queuename is an optional parameter that specifies the new name of the queue.

Example

This example sets the name of the queue as Sample_Job_Queue. Ensure that the specified queue is existing.

set queue = CreateObject("UCX:Queue") 
’Setting queue name to print Queue 
queue.Name = "Sample_Job_Queue" 
print("Name of the Queue: " & queue.Name)

7.2.3 Type property

Returns a queue type.

Syntax

object.Type

Type

String.

Attributes

Read-only.

Example

This example returns the queue type of Sample_Job_Queue. Ensure that the specified queue is existing.

set queue = CreateObject("UCX:Queue") 
queue.Name = "Sample_Job_Queue" 
print("Type of the Queue: " & queue.Type)

7.2.4 Attach method

Attaches the calling process as the job server for the specified in the Name property.

Syntax

object.Attach()

Parameters

None.

Return Values

Boolean. Returns TRUE if the job server is successfully attached.Otherwise, FALSE.

Example

This example attaches the calling process as the job server for the queue Sample_Job_Queue. Ensure that the specified queue is existing.

set Queue = CreateObject("ucx:Queue") 
Queue.Name = "Sample_Job_Queue" 
Queue.Attach

See Also

7.2.5 Detach method

Detaches the calling process as the job server for the queue specified in the Name property.

Syntax

object.Detach()

Parameters

None.

Return Values

Boolean. Returns TRUE if the job server is successfully detached. Otherwise, FALSE.

Example

This example detaches the calling process from the queue Sample_Job_Queue. Ensure that the specified queue is existing.

set Queue = CreateObject("ucx:Queue") 
Queue.Name = "Sample_Job_Queue" 
Queue.Attach 
Queue.Detach

See Also