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