home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 957 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!rutgers!uwvax!uchinews!ellis!sip1
  2. From: sip1@ellis.uchicago.edu (Timothy F. Sipples)
  3. Newsgroups: comp.lang.rexx
  4. Subject: Reading inline "code" as input?
  5. Message-ID: <1992Sep8.163642.16833@midway.uchicago.edu>
  6. Date: 8 Sep 92 16:36:42 GMT
  7. Sender: news@uchinews.uchicago.edu (News System)
  8. Reply-To: sip1@midway.uchicago.edu
  9. Organization: Dept. of Econ., Univ. of Chicago
  10. Lines: 35
  11.  
  12. Is there any way a REXX program can take data input from itself
  13. (without resorting to QUEUE or PUSH)?
  14.  
  15. More specifically, say I have a program as follows:
  16.  
  17. /* Sample Program */
  18. SIGNAL process
  19. Ant Dog Cat Mouse
  20. Donkey Mule Pig Horse
  21. :process
  22. eof = 0
  23. do until eof
  24. /* Input that data here and process. */
  25. end
  26. EXIT
  27.  
  28. I know I can detect how many lines are in the program -- there's a
  29. function to do that -- but can I actually read the lines in?
  30.  
  31. Is it kosher to STREAM(...OPEN) the REXX program itself to read in
  32. inline data, i.e. can a REXX program STREAM(...OPEN) itself?  What is
  33. the best way to detect the full pathname to the REXX program itself,
  34. while it is running, for that purpose?
  35.  
  36. The reason I am asking is that I am working on enhancements to
  37. REXXShip, and a nice one would be to incorporate XXEncode
  38. compatibility, which would mean having an unmodified stretch of bytes
  39. in the middle of the code for purposes of encoding a binary file.  The
  40. REXX "wrapper" would read that stretch of bytes and decode the file.
  41.  
  42. -- 
  43. Timothy F. Sipples      | The OS/2 FREQ. ASKED QUESTIONS LIST is avail. from
  44. sip1@ellis.uchicago.edu | 128.123.35.151, anonymous ftp, in /pub/os2/all/faq.
  45. Dept. of Econ., Univ.   | Or from LISTSERV@BLEKUL11.BITNET (send "HELP").
  46. of Chicago, 60637       | Family Values Means a Job
  47.