TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Brad Jackson
from: Daniel Doran
date: 1994-12-01 23:09:00
subject: Rexx Queues

BRAD JACKSON had something deep to write about Rexx QUEUES


BJ> I created a little test - two small .CMD files called HOST.CMD and
BJ> CLIENT.CMD.  CLIENT was run first, and basically created a named
BJ> queue and entered a loop until something got QUEUED(), then PULLed
BJ> the something and used SAY to display it.

I've got a pair that do work under 2.1:

 /* REXX queue reciever called QUEUE.CMD */
 call RxFuncAdd "SysLoadFuncs", "REXXUtil",
"SysLoadFuncs"
 call SysLoadFuncs
 parse arg fn gbg
 qname='PUBLICQ'
 nq=RXQueue("create",qname)
 say 'qName='nq
 if nq\=qname then do
     call RXQueue 'delete', nq
     'exit'
     exit
 end
 if nq\=qname then rc=RXQueue('delete',nq);
 oq=RXQueue('set',qname)
 do forever
     do while queued()>0;
         pull cmd
         select
             when cmd="QUIT" | cmd="CANCEL"
                 then do;
                     call RXQueue 'set' ,oq
                     call RXQueue 'delete' ,qname
                     exit 0;
                     end
             otherwise
                 call RXQueue 'set', oq
                 say '"'||cmd||'"'
                 if fn>'' then call lineout fn,cmd
                 call RXQueue 'set', nq
         end
     end
     call SysSleep 1
 end

 /* REXX queue sender, called Q.CMD */
 call RxFuncAdd "SysLoadFuncs", "REXXUtil",
"SysLoadFuncs"
 call SysLoadFuncs
 signal on syntax name hfail
 qname='PUBLICQ'
 oq=RXQueue("set",qname)
 push arg(1)
 call RXQueue "set", oq
 exit 0
 hfail:
 call RXQueue "set", oq
 say qname 'is not open'

I tried just now: 
 start QUEUE  
 q hello        
 q quit        

Give these a try.  Queues in REXX are harder to use than they
initially look.  I had lots of system service failures before I got
the hang of it.  Win or lose, I'd like to hear how this works out.

 * KWQ/2 1.2g * Live Long and Perspire.


--- QScan v1.131b / 01-0093

* Origin: La Cantina BBS * El Paso * 915-532-0332 6GB, 3 Nodes (1:381/123)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 381/123 900 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.