home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!ohstpy!viznyuk
- From: viznyuk@ohstpy.mps.ohio-state.edu
- Newsgroups: comp.os.vms
- Subject: The problem with $CREMBX System_Service
- Message-ID: <14709.2b092769@ohstpy.mps.ohio-state.edu>
- Date: 17 Nov 92 17:10:01 EST
- Lines: 42
-
- Hello VMS community !
-
- I have a little question about
- $CREMBX System_Service.
- Here is a piece of program
- which is supposed to read data
- from terminal and then write them
- to mailbox, where they are supposed
- to be picked up by parallel subprocess
- (usually - DCL).
-
- [......]
- char w;
- static short tt,ch;
- $DESCRIPTOR(TT,"SYS$INPUT");
- $DESCRIPTOR(MB,"MAILBOX");
- short iosb[4];
- unsigned flag = CLI$M_NOWAIT;
- [......]
- SYS$ASSIGN(&TT,&tt,0,0,0);
- SYS$CREMBX(0,&ch,0,0,0,0,&MB,0);
- LIB$SPAWN(0,&MB,0,&flag,0,0,0,0,0,0,0,0,0); /* starts parallel subprocess */
- for (;;)
- {
- SYS$QIOW(0,tt,IO$_TTYREADALL+IO$M_NOECHO+IO$M_TRMNOECHO+
- IO$M_ESCAPE,iosb,0,0,&w,1,0,0,0,0); /* -----> Reads single char w
- from terminal */
- SYS$QIO(0,ch,IO$_WRITELBLK+IO$M_NOW,iosb,0,0,
- &w,1,0,0,0,0); /* ---> writes char w to mailbox */
- }
-
-
- Now the problem is that DCL which is run in the subprocess
- started by LIB$SPAWN understands each write made by second
- SYS$QIO above, as if it is followed by <RET> keystroke, that
- is as if terminal is in "raw" mode.
- Does anybody know how to make DCL in subprocess read
- data from mailbox in its usual way - by strings, not by
- single chars ? May be I missed some flags ?
-
- I would appreciate any suggestions.
- S.Viznyuk
-