Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ucbvax!psw.DEC.COM!winalski From: winalski@psw.DEC.COM.UUCP Newsgroups: mod.computers.vax Subject: SYS$HIBER trouble in UIS application Message-ID: <8701252202.AA11597@decwrl.dec.com> Date: Sun, 25-Jan-87 17:02:17 EST Article-I.D.: decwrl.8701252202.AA11597 Posted: Sun Jan 25 17:02:17 1987 Date-Received: Mon, 26-Jan-87 02:32:57 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 39 Approved: info-vax@sri-kl.arpa There are several problems with your SYS$WAKE call that I can see: 1) SYS$WAKE takes two parameters, whereas you passed only one. 2) To specify a zero PID value to deafult the PID to the current process, you must either omit the PID parameter or specify it as a 0 passed BY VALUE. The call as you specified it: > status = sys$wake(pid) passes the zero PID value by reference. The call should be: status = sys$wake(%val(0)) or even better: status = sys$wake(,) 3) The "message number 0" problem occurs because SYS$WAKE begins with the letter "S". It is therefore a REAL subroutine. The return value from SYS$WAKE (which should be SS$_NONEXPR in this case) is being converted to INTEGER because STATUS is an INTEGER*4 variable. Viewed as a floating point number, SS$_NONEXPR is a "dirty zero" value. Thus, STATUS gets the value 0 and when you SIGNAL it, you get the "message number 0" display. You must say: INTEGER*4 sys$wake at the top of the subroutine, or add the line: INCLUDE '($SYSSRVNAM)' at the top of the subroutine. Remember that in FORTRAN, every program unit is independent. The INCLUDEs that you did in the main program don't carry over to the subroutines. --PSW