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

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
  2. From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: The problem with $CREMBX System_Service
  5. Date: 19 Nov 1992 03:00:09 GMT
  6. Organization: HST Wide Field/Planetary Camera
  7. Lines: 32
  8. Distribution: world
  9. Message-ID: <1eevvpINNhgv@gap.caltech.edu>
  10. References: <14709.2b092769@ohstpy.mps.ohio-state.edu>,<1992Nov18.171216.26136@nntpd2.cxo.dec.com>
  11. Reply-To: carl@SOL1.GPS.CALTECH.EDU
  12. NNTP-Posting-Host: sol1.gps.caltech.edu
  13.  
  14. In article <1992Nov18.171216.26136@nntpd2.cxo.dec.com>, winalski@adserv.enet.dec.com (Paul S. Winalski) writes:
  15. =
  16. =The DCL command interpreter uses RMS to read its input file.  RMS is a record-
  17. =oriented I/O system.  When the input device is a terminal, the sequence of
  18. =characters up to a carriage return (or other similar line-terminating control
  19. =character) is considered a single record.  When the input device is a mailbox,
  20. =RMS considers each message in the mailbox to be a separate record.  You are
  21. =reading characters one at a time from the terminal and then writing them one
  22. =at a time using $QIO to the mailbox.  Each character thus ends up as a separate
  23. =message, and is seen as a separate record by DCL.
  24.  
  25. The fault is not in RMS.  MAILBOXES ARE RECORD-ORIENTED DEVICES.  You can't
  26. read a single character from a mailbox (well, you CAN, by using $QIO[W], but
  27. the only character you can read singly is the first character of a record, and
  28. then you lose the rest of the record).
  29.  
  30. =The solution is to buffer characters inside your program until you read a
  31. =CR from the terminal, then write the buffered string (not including the CR) to
  32. =the mailbox using one $QIO.
  33.  
  34. Or have the application that's reading the mailbox buffer what it reads until
  35. it sees a CR in the data its reading from the mailbox.  Both techniques are
  36. equally effective, and I'd choose the one for which obtaining and modifying the
  37. source code is easier.
  38. --------------------------------------------------------------------------------
  39. Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
  40.  
  41. Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
  42. understanding of astronomy is purely at the amateur level (or below).  So
  43. unless what I'm saying is directly related to VAX/VMS, don't hold me or my
  44. organization responsible for it.  If it IS related to VAX/VMS, you can try to
  45. hold me responsible for it, but my organization had nothing to do with it.
  46.