similar function to ibm's RXQUEUE.EXE in REGINA REXX 
Author Message
 similar function to ibm's RXQUEUE.EXE in REGINA REXX

Regina doesn't support multiple queues.  Also, the "queue" only persists
over the execution of Regina--that is, it is available in the rexx
originally called when Regina is run, and also in any rexxes called from
that rexx.

Also, in Regina, "call" won't return control to your parent process till the
child process completes, so you would have pipe the stuff to rxqueue before
calling the second process.

- Peter

Quote:
> -----Original Message-----

> Sent: Saturday, April 24, 1999 3:32 AM

> Subject: similar function to ibm's RXQUEUE.EXE in REGINA REXX

> hello all,
> in my scripts i use the rxqueue mechanism to realize
> inter process communication between processes.
> can somebody tell me how to realize this in regina rexx?

> thank you for any tips.

> sample: (i hope, there are not too many errors because of
> linewrapping,
>          following lines are in teh attechment too).
> ------------
> /* test my ipc */  

> Call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs  /* registrieren*/
> Call sysloadfuncs                                /* REXX Funktionen */

> QTit='MyQName'     /* Queuename */
> call MyIPCProc     /* create secon process */
> 'echo /SAY:'Date('s') Time() 'Start 2>nul | RXQUEUE' QTit' /* send
> somthing to 2nd proc */
> call syssleep 60 /* sleep 60 sec */
> 'echo /ExitNow: 2>nul | RXQUEUE' QTit /* exit 2nd proc */
> exit

> /*------------------------------------------------------------------*/
> MyIPCProc: /* Statusdisplay-every call... should be one singel line!*/
> /*------------------------------------------------------------------*/
> Cmd2='C:\TestQ.CMD'
> call SysFileDelete Cmd2
> call lineout Cmd2,"/* Anzeige Ausgabe des Packvorganges */"
> call lineout Cmd2,"parse source os . myRexxName ."
> call lineout
> Cmd2,"MyVer=substr(MyRexxName,lastpos('\',MyRexxName)+1)':('st
> ream(MyRexxName,'c',
> 'query datetime')')'"
> call lineout Cmd2,"'mode 90,40'"'3B'x"'color 0a'"'3b'x "SIGNAL ON HALT
> NAME EndIt "
> call lineout Cmd2,"qid = rxqueue('Create','"QTit"')"'3B'x" oldqname =
> rxqueue('Set','"QTit"')"
> call lineout Cmd2,"Log='"_PakLog"'"'3B'x"i=40"
> call lineout Cmd2,"do forever "
> call lineout Cmd2,"  if i>30 then call Kopf"
> call lineout Cmd2,"  data = linein('QUEUE:') "
> call lineout Cmd2,"  select"
> call lineout Cmd2,"    when left(data,5)='/CLS:' then call Kopf"
> call lineout Cmd2,"    when left(data,5)='/SAY:' then do"
> call lineout Cmd2,"      say substr(data,6)"
> call lineout Cmd2,"      i=i+1"
> call lineout Cmd2,"    end"
> call lineout Cmd2,"    when left(data,9)='/ExitNow:' then call EndIt"
> call lineout Cmd2,"    otherwise nop"
> call lineout Cmd2,"  end"
> call lineout Cmd2,"end"

> call lineout Cmd2,"say '    'left(MyVer,49) date() time()"
> call lineout Cmd2,"say '  
>
> ?'"
> call lineout Cmd2,"say '   o        
> Statusdisplay                                                o'"
> call lineout Cmd2,"say '  
>
> ?'"
> call lineout Cmd2,"say ''"'3b'x"say ''"'3B'x"i=0"'3B'x"return"
> call lineout Cmd2,"EndIt:"x2c('3B')" call rxqueue 'Delete','"QTit"'"

> call lineout Cmd2,"'EXIT 0'"
> call stream  Cmd2,'c','close'

> return

> ------------

> --
> Ciao,

> Robert Bunyai,           Tel. : +43 1 47666-2517
> Telekom/IS, Service PC,  Mobil: +43 664 380 60 24
> Antonigasse 101          Fax. : +43 1 403 55 99




Fri, 12 Oct 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Regina vs IBM REXX: builtin functions

2. NT Regina REXX rxqueue

3. Regina vs IBM Object Rexx

4. Regina / Linux / external rexx functions

5. external Regina Rexx functions on LINUX?

6. How do you access DLL functions using Regina REXX under Windows NT

7. Rexx-library in Regina & external functions

8. Regina REXX, OLE and Patrick's w32funcs

9. Y2K bug in regina's date function ??

10. Porting an OS/2 Rexx to Regina Rexx

11. Help with ASM function in IBM PC-DOS 7.0 REXX

12. REXX CGI scripts under UNIX with Regina REXX

 

 
Powered by phpBB® Forum Software