home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / vms / 18227 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  2.6 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!uvaarpa!concert!ais.com!bruce
  2. From: bruce@ais.com (Bruce C. Wright)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: The problem with $CREMBX System_Service
  5. Message-ID: <1992Nov19.093226.5845@ais.com>
  6. Date: 19 Nov 92 09:32:26 GMT
  7. References: <14709.2b092769@ohstpy.mps.ohio-state.edu>,<1992Nov18.171216.26136@nntpd2.cxo.dec.com> <1eevvpINNhgv@gap.caltech.edu>
  8. Distribution: world
  9. Organization: Applied Information Systems, Chapel Hill, NC
  10. Lines: 39
  11.  
  12. In article <1eevvpINNhgv@gap.caltech.edu>, carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
  13. > In article <1992Nov18.171216.26136@nntpd2.cxo.dec.com>, winalski@adserv.enet.dec.com (Paul S. Winalski) writes:
  14. > =
  15. > =The DCL command interpreter uses RMS to read its input file.  RMS is a
  16. > =record-oriented I/O system.   [...]
  17. > The fault is not in RMS.  MAILBOXES ARE RECORD-ORIENTED DEVICES.  You can't
  18. > read a single character from a mailbox (well, you CAN, by using $QIO[W], but
  19. > the only character you can read singly is the first character of a record,
  20. > and then you lose the rest of the record).
  21. > =The solution is to buffer characters inside your program until you read a
  22. > =CR from the terminal, then write the buffered string (not including the CR)
  23. > =to the mailbox using one $QIO.
  24. > Or have the application that's reading the mailbox buffer what it reads until
  25. > it sees a CR in the data its reading from the mailbox.  Both techniques are
  26. > equally effective, and I'd choose the one for which obtaining and modifying
  27. > the source code is easier.
  28.  
  29. Another solution, which may be more like what the original author was
  30. looking for, would be to use the pseudoterminal driver (either the FTA
  31. driver or the PY/TW drivers depending on VMS version and/or convenience).
  32. It wasn't entirely clear to me whether the applications were all newly-
  33. written applications or not;  and in any event, from the point of view
  34. of the consumer application, a pseudo-terminal is (nearly) indistinguish-
  35. able from a real terminal, so even if it isn't newly-written it would
  36. probably be very easy to make it run on a pseudo-terminal.
  37.  
  38. You can often use mailboxes for this sort of thing, but as Carl points
  39. out there are problems because of the record-oriented nature of mailbox
  40. I/O.  But the pseudoterminal drivers are true stream-oriented devices
  41. that allow you to do single-character I/O in the manner that the original
  42. author was expecting the mailbox driver to operate.  They're both useful
  43. devices, but in general mailboxes are more useful for sending highly
  44. structured messages, and pseudoterminals are more useful for capturing
  45. terminal-like I/O streams.
  46.  
  47. Bruce C. Wright
  48.