Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!decwrl!ucbvax!KESTREL.ARPA!sci From: sci@KESTREL.ARPA.UUCP Newsgroups: mod.computers.vax Subject: Re: FORTRAN READ timeout ... Message-ID: <8607310050.AA20992@kestrel.ARPA> Date: Wed, 30-Jul-86 20:50:19 EDT Article-I.D.: kestrel.8607310050.AA20992 Posted: Wed Jul 30 20:50:19 1986 Date-Received: Fri, 1-Aug-86 02:11:27 EDT References: <8607301406.AA02965@ucbvax.Berkeley.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: kestrel!sci (Mike Liveright) Organization: Kestrel Institute, Palo Alto, CA Lines: 38 Approved: info-vax@sri-kl.arpa To get a FORTRAN READ with timout: 1) Get the channel of the TT: character*20 devnam CALL SYS$TRNLOG( 'TT',, devnam,, ) CALL SYS$ASSIGN( devnam, ichan,, ) 2) Issue a QIOW with timeout CALL SYS$QIOW( , %val(ichan), %val(IO$_READVBLK.or.IO$M_TIMED) 1 ,,,, byinp, %val(80), %val(numsec),,, ) where: INCLUDE '($IODEF)' !! Includes the IO definitions byte byinp(80) !! Is the buffer to read to integer numsec/10/ !! Is the number of seconds to wait Note.. To use this from a DCL program, you could get the prompt via CALL LIB$FOREIGN( chprompt,, num ) TYPE *,chprompt(1:num) where: character*80 chprompt And then set a symbol to the returned value, or to a canned value CALL LIB$SET_SYMBOL( 'SCI_GETUSER', chreturn, 2 ) The DCL to get the timed read would then be: $ GETUSER = "$Disk:[Directory]GETUSER !! where GETUSER is the program $ GETUSER "$Please enter Response" $ if( SCI_GETUSER ... ) THEN ... !! Test response