🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer.misc
Article #3

REXX: Named Pipe

#3
From: Wonkoo Kim
Date: Mon, 31 Jul 1995 16:53
31 lines
1661 bytes
Would someone be kind enough to show me some examples of
how to use named pipe within REXX script of OS/2 Warp?

I could only see a short (too short) description of SysWaitNamedPipe
from REXX online reference of OS/2 Warp, which was the only one
regarding named pipe throughout the whole REXX reference manual.  
In the description, there was a short example, but it was too vague 
and had some error.  The example code was,

 parse value stream(PipeName,'C','OPEN') with PipeStatus ':' os2rc
 if os2rc=231 then call SysWaitNamedPipe PipeName,-1

So, I defined PipeName='\PIPE\foo', but I couldn't open the named pipe. 
In my tests, stream(pipename,'c','open') always returned 'NOTREADY:3', 
and I couldn't see 231 in the return code string, and even if I call
rc = SysWaitNamedPipe(pipename,-1), it also failed with rc=3 which
is not described in the REXX ref.

How do I open, use, close a named pipe within OS/2 Warp REXX script?

And, if I had two programs that accept input and output file names
in the command line like "prog infile outfile", can I do the following: 
	prog1 infile pipename
	prog2 pipename outfile
in a REXX script using named pipe?

Thanks.

--
Wonkoo Kim
wkim+@pitt.edu
Technical Details
Message-ID: <3vj1pg$2te@usenet.srv.cis.pitt.edu>
Path: arc1-ca.pugleaf.net!newsfeed.pitt.edu!news

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newsfeed.pitt.edu!news
From: wkim+@pitt.edu  (Wonkoo Kim)
Newsgroups: comp.os.os2.programmer.misc,comp.os.os2.misc,comp.lang.rexx
Subject: REXX: Named Pipe
Date: 31 Jul 1995 16:53:03 GMT
Organization: University of Pittsburgh
Distribution: world
Message-ID: <3vj1pg$2te@usenet.srv.cis.pitt.edu>
Reply-To: wkim+@pitt.edu  (Wonkoo Kim)
NNTP-Posting-Host: ehdup-h-13.rmt.net.pitt.edu
X-Newsreader: IBM NewsReader/2 v1.2