home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
SERVER.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-07-07
|
2KB
|
54 lines
/***************************************************************************
Date: June 11, 1991
Sample REXX Code: Queue Server
Function:
Create a private queue "FRED"
Set this to be the current Queue
DO FOREVER
Wait for data to appear on the private Queue
Read it in
Say it
END
How to Use:
This is a simple bit of sample code to show how to set up an interprocess
communication session between two OS/2 sessions using the REXX Queue.
(1) Open a text session and run SERVER.CMD. Alternatively,
you could issue the command START PMREXX SERVER.CMD to run the
server in a PM session.
(2) Open another text session and pipe the output from any command
into the RXQUEUE filter utility and specify the private queue
named FRED. For example,
dir | rxqueue fred
or strip off the extraneous stuff and just get the file names:
dir /f | rxqueue fred
Author: Jay A. Tunkel
IBM Corporation
OS/2(tm) Architecture and System Design
Compuserve: 76307,502
internet: tunkel@bcrvmpc1.vnet.ibm.com
***************************************************************************/
qid = rxqueue("Create","FRED") /* Create a private queue */
say qid /* just for fun, look at the internal*/
/* queue ID */
oldqname = rxqueue("Set","FRED") /* Change the current queue to the */
/* one that was just created */
say oldqname /* What was the old name? */
do forever
data = linein("QUEUE:") /* Wait for data, then read it in */
say data
end