Category : OS/2 Files
Archive   : REXEXMPL.ZIP
Filename : SERVER.CMD

Output of file : SERVER.CMD contained in archive : REXEXMPL.ZIP
Date: June 11, 1991

Sample REXX Code: Queue Server

Create a private queue "FRED"
Set this to be the current Queue
Wait for data to appear on the private Queue
Read it in
Say it

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: [email protected]

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

  3 Responses to “Category : OS/2 Files
Archive   : REXEXMPL.ZIP
Filename : SERVER.CMD

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: