home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / programm / 6536 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.7 KB

  1. Path: sparky!uunet!vnet.ibm.com
  2. From: francis@vnet.ibm.com (Tim Francis)
  3. Message-ID: <19921118.135726.970@almaden.ibm.com>
  4. Date: Wed, 18 Nov 92 16:50:57 EST
  5. Subject: Re: Command in REXX to execute the text in a variable?
  6. Newsgroups: comp.os.os2.programmer
  7. References: <widow.722104795@camelot> <1992Nov18.111554.1243@galaxy.gov.bc.ca>
  8. Reply-To: francis@vnet.ibm.com
  9. Organization: IBM Canada Lab, WorkFrame/2 development
  10. Disclaimer: This posting represents the poster's views, not those of IBM
  11. Lines: 39
  12.  
  13. In article <1992Nov18.111554.1243@galaxy.gov.bc.ca>,
  14. sasmith@galaxy.gov.bc.ca writes:
  15. >
  16. >In article <widow.722104795@camelot>, widow@camelot.bradley.edu (Shaun Burnett) writes:
  17. >
  18. >>     xxxxx Program,Filename
  19. >>
  20. >>     where xxxxx is a command that would pass "f:\utils\unzip -v
  21. >>     g:\aoc.zip" to an environment shell (DOS or OS/2).
  22. >>
  23. >>     Any help would be greatly appreciated.  I haven't found a
  24. >>     "quick reference" that describes all the commands on one page,
  25. >    How about
  26. >
  27. >       interpret Filename Program
  28. >
  29. >    The REXX interpret command should handle this.
  30.  
  31. Yes, Interpret will handle this, but is unnecessary.  One of the beauties
  32. of REXX is that unrecognized commands get passed onto the command shell
  33. automatically.  Thus, you can do the following:
  34.  
  35. Cmd = 'ERASE'
  36. File = 'D:\This\is\my\file'
  37. Cmd File
  38.  
  39. There's actually very little that REQUIRES the use of interpret.  It's
  40. a little like GOTO -- very powerful, very easy to misuse.  You could
  41. use interpret to execute a REXX command dynamically, for example.  The
  42. following program will allow you to type in (and execute) any REXX
  43. commands.  Try it - it's useful for learning new REXX commands.
  44.  
  45. /**/
  46. do forever
  47.   parse pull cmd
  48.   interpret cmd
  49. end
  50.  
  51. -tim
  52.