queuerexx

Anyone know of Milsted rexx for windows? Open-rexx?


CA's automation point product has an embedded rexx interpreter. I've used other Rexx interpreters before back to the original on CMS. I'm trying to access the external data queue to allow the AP rexx scripts to invoke and get data back from programs in other languages. Now CA have made it clear it's not Object rexx or OORexx but "Milstead" (sic) rexx. I use Neil Milsted's Uni-Rexx (nice one Neil if you're reading) which implements rxqueue which does what I need.

parse version name level
say "rexx is " name " and " level
say "rexx util is " RxFuncQuery("SysUtilVersion")

gives:

rexx is  REXX:Open-REXX:299:Open-REXX:ASCII:MultiThread:DynamicLink  and  4.00 04 Feb 2008
07/15/2011 08:27:19 rexx util is  30

My google-fu is failing me here and I keep coming back to the same websites.
So does anyone know this specific Rexx and how I can get it to run non-rexx code and get output back? I really don't want to be I/O-bound writing to temp files.


Solution

  • If what you want is to get output from an external program (executable) into REXX you can use the POPEN function which redirects the standard output of a command into the external data queue. You can then manipulate the queue using the following instructions:

    A simple example:

    call popen ('dir /?')
    lines = QUEUED()
    
    say "Number of output lines:" lines
    do i = 1 to lines
       pull line
       say "Line #"||i||":" line
    end