OS/2 Procedures Language 2/REXX


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


Queue Interface


REXX provides queuing services entirely separate from the OS/2 
interprocess communications queues. The queues discussed here are solely 
for the use of REXX programs. 
REXX queues are manipulated within a program by these instructions: 
 PUSH        Stacks a string on top of the queue (LIFO). 
 QUEUE       Adds a string to the tail of the queue (FIFO). 
 PULL        Reads a string from the head of the queue. If the queue is 
             empty, input is taken from the console (STDIN:). 
 
 To get the number of items remaining in the queue, use the function 
 QUEUED. 
 Access to Queues 
 There are two kinds of queues in REXX. Both kinds are accessed and 
 processed by name. 
 Session Queues - One session queue is automatically provided for each 
 OS/2 session in operation. Its name is always SESSION, and it is created 
 by REXX the first time information is put on the queue by a program or 
 procedure. All processes (programs and procedures) in a session can 
 access the session queue. However, a given process can only access the 
 session queue defined for its session, and the session queue is not 
 unique to any single process in the session. 
 Private Queues - Private queues are created (and deleted) by your 
 program. You can name the queue yourself or leave the naming to REXX. In 
 order for your program to use any queue, it must know the name of the 
 queue.   

Inf-HTML End Run - Successful