Yes. The only difference is that you MUST specify the command environment.
You have to issue a global "address rxpipe" or prefix your pipe commands
with "address rxpipe".
Also on Linux you have to be aware of case sensitivity.

Below is one of the sample Rexx scripts.

/* #CallPipeDemo.rexx */
address rxpipe
arg verify

if verify then
   cons = '|digest md5|var hash'
else do
   cons = '|console'
   say "Demostrate the Rexx stage and CallPipe command"
end

pipe = "(end ?) stem Stem0.",
   "|rexx CallPipeStage sort",
   "|literal CallPipe demo with '"sort"' option"||,
   "|f:fanin 0 1",
   cons,
 "? stem Stem0.",
   "|CallPipeStage",
   "|drop 1",
   "| xlate 1-* A-F 3a-3f", /* Translate A to F to be above X"F9" */
   "| sort",                /* Sort the records */
   "| xlate 1-* 3a-3f A-F", /* Restore original characters A to F */
   "|literal CallPipe demo with out '"sort"' option"||,
   "|f:"

data = "B999-1 1323-1 FFFF-1 BA82-1 1A43-1 20DD-1 xyz B999-2 1323-2
FFFF-2 BA82-2 1A43-2 20DD-2"

'pipe var data|split|stem stem0.'

if \verify then
   call "FormatPipe" pipe

'pipe' pipe

if verify then
   failed = hash \= 'CCD6E86E008D05AD4952AC341FDFDEB7'
else
 failed = 0

return failed

Here is the user stage:

/* callPipeStage */
address rxpipe
arg opt .

if opt = "SORT" then
 pipe = "*.input:",             -- connect to output of stage preceding
caller
     "| tolabel xyz"||,
       "| xlate 1-* A-F 3a-3f", -- Translate A to F to be above X"F9"
       "| sort",                -- Sort the records
       "| xlate 1-* 3a-3f A-F", -- Restore original characters A to F
     "| *.output:"            -- connect to input of stage following caller
else
 pipe = "*.input:",         -- connect to output of stage preceding caller
      "| frlabel xyz"

'callpipe' pipe

'select both 0'

if opt <> "SORT" then do
 'PeekTo line'
 do while rc = 0
   'Output' line
   if rc = 0 then do
     'ReadTo'
     'PeekTo line'
   end
 end
end

Kris Buelens wrote:
After reading PC-Pipes web page, the Rexx support still isn't clear to me.
Does it mean now that a OOrexx programs can call PC-Pipes just like in z/VM?

2009/7/6 James Johnson <[email protected]>


A new release of PC-Pipes is available.

On Windows systems PC-Pipes can be used via  PowerShell 1.0 or ooRexx
4.0, on Linux systems
ooRexx 4.0 must be used.

System requirements:
 Windows:
    XP
    Net Framework 2.0 or higher
     PowerShell version 1.0 and/or ooRexx version 4.0

 Linux:
    kernel 2.6  (Code was built and tested on a 2.6 system but should
work on earlier systems)
    Mono 2.4
    ooRexx 4.0

The code can be found at the following address:

       http://ipages.iland.net/~jimj/ <http://ipages.iland.net/%7Ejimj/>

Any thoughts or comments are welcome.

James Johnson





--
Kris Buelens,
IBM Belgium, VM customer support


Reply via email to