home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!uakari.primate.wisc.edu!doug.cae.wisc.edu!umn.edu!noc.msc.net!uc.msc.edu!apctrc!wsc!mozart!zjlc12
- From: zjlc12@hou.amoco.com (Jerry Campbell)
- Newsgroups: comp.lang.rexx
- Subject: Re: Capturing System Command Output (was: SH
- Message-ID: <1992Aug20.140814.6476@hou.amoco.com>
- Date: 20 Aug 92 14:08:14 GMT
- References: <19920819090033SEB1525@MVS.draper.com>
- Sender: news@hou.amoco.com
- Reply-To: zjlc12@hou.amoco.com
- Organization: Amoco
- Lines: 43
-
- In article 19920819090033SEB1525@MVS.draper.com, SEB1525@MVS.draper.com (Steve Bacher) writes:
- >Just from the UI POV, how about a fifth:
- >
- > rcode = queue_to_stack("ls" directory)
- >
- >and
- >
- > rcode = dump_into_stem_vars("ls" directory, "STEMPREFIX.")
- >
- >(Choose your own function names - these are for self-evidentness.)
- >
- >Similar syntactically to popen(), but captures stdout and puts it
- >on the data stack or in stem variables a la EXECIO.
- >
- >............................................... the programming
- >interface to get at the data should be in the REXX culture, not
- >the culture of the surrounding OS. This would also get around
- >the "address something-other-than-the-native-shell" problem
- >you alluded to with the 'address ftp; "ls | rxqueue"' difficulty.
- >
- >.....
- >
- >No, a better solution would be to have one method. Dispatching on
- >whether a particular syntax is used is just as bad as, and possibly
- >worse than, dispatching on a particular implememntation.
- >
- >--
- >Steve Bacher (Batchman) Draper Laboratory
- >Internet: seb@draper.com Cambridge, MA, USA
-
- I totally agree with Mr. Bacher. I think the problem needs to be abstracted
- from any operating system specifics. In other words, set down a "standard"
- way of doing this from rexx programmer's point of view. Something like
- queue_to_stack() or whatever, something that is pure rexx and not tied to
- what kind of shell you're in. If that can be agreed on then the ugly details
- of how to implement such a thing would be left to the language implementor.
- I believe that's where responsibility for implementation specifics of "standard"
- language features should reside.
-
- ---
- Jerry Campbell reply to: zjlc12@hou.amoco.com
- Amoco Corp. ISD SSS/Graphics
- Houston, Tx. 713/556-7036
-