[comp.os.vms] Need help with RSX exec routines.

bobp@tekcae.TEK.COM (Robert N. Perry (Bob)) (06/01/87)

	I'm running RSX11-M v4.2 rev. D on an 11/73 w/512K . My problem
lies with the MRKT$ excecutive routine (I think). Visualize the following
FORTRAN (F77) code:

	INTEGER IOSB(2), IPAR(6), ISTAT, DSW

	BYTE IBUF(133)

C
	DSW = 0			!MAKE SURE THE DSW IS ZEROED
	ISTAT = 0		!RESET THE STATUS FLAG
C
	CALL GETADR ( IPAR(1), IBUF )
	IPAR (2) = 133
	IPAR (3) = 0
C

	CALL QIO ( 520, 1, 2, IOSB, IPAR, )	!IO.RAL using EF #2
	CALL MARK (1, 5, 2, DSW)	!SET A 5 SECOND TIMER
	CALL WFLOR (1, 2 )	!WAIT FOR LOGICAL OR OF EF's 1 & 2
	CALL READEF ( 1, DSW )	!SEE IF THE SIG. EVENT WAS EF #1
	IF ( DSW .GT. 0 ) ISTAT = 1 !SET THE STATUS FLAG IF EF #1 WAS SET
	CALL CANMT ( 2, )


	What happens is the MRKT$ (MARK) directive is indicating that EF #1
is always being set immediately after the CALL MARK. This should only be
happening after a 5 second delay. Any ideas what might be causing this?
This piece of code is used as a timeout mechanism.

-- 
Robert N. Perry (Bob)  Tektronix-Beaverton, Oregon "Skydive for better health"
bobp%tekcae@tektronix.TEK.COM
"When I works, I works hard. When I sits, I sits easy. When I thinks, I goes
to sleep."

fosler@inmet.UUCP (06/18/87)

	CALL QIO ( 520, 1, 2, IOSB, IPAR, )	!IO.RAL using EF #2
	CALL MARK (1, 5, 2, DSW)	!SET A 5 SECOND TIMER
	CALL WFLOR (1, 2 )	!WAIT FOR LOGICAL OR OF EF's 1 & 2
	CALL READEF ( 1, DSW )	!SEE IF THE SIG. EVENT WAS EF #1
	IF ( DSW .GT. 0 ) ISTAT = 1 !SET THE STATUS FLAG IF EF #1 WAS SET
	CALL CANMT ( 2, )


    Ok, I bite, I compare this code agaist the code that we have used
on both RSX-11M and RSX-11M+.

    First, the QIO is missing a parm before IOSB, the priority which is
ignored, but must be present in call, so the QIO might be failing.  The
new QIO should be

	CALL QIO (520, 1, 2, 1, IOSB, IPAR, IDSW)
        IF (IDSW .NE. 1) ERROR

   Also, on our machine, the READEF is done on the QIO EF.  I do not know if
this is being done because the MARK EF has problems or if that was the way they
wrote it the first time.

Carl Fosler   Intermetrics, Inc
spl1_cf@inmet.eve.com        301 657-3775.