Path: utzoo!utgpu!attcan!uunet!husc6!uwvax!rutgers!ucsd!ucbvax!CITHEX.CALTECH.EDU!carl From: carl@CITHEX.CALTECH.EDU (Carl J Lydick) Newsgroups: comp.os.vms Subject: Re: SYS$BRKTHRU help needed ... Message-ID: <880801040419.1124@CitHex.Caltech.Edu> Date: 1 Aug 88 11:11:01 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 22 > I want to use SYS$BRKTHRU in a Fortran program. I want to use it to to > send messages to various users who are logged in. I can't seem to get it > to work. The following sample program is designed to send a message to > myself when executed. It doesn't work. Does anyone know what I am doing > wrong? I would appreciate any help that I could get. > > C-------- Sample Program --------- > > istat = sys$brkthru(,%descr('Hello there!'),%DESCR('SWANGER'), > * ,,,,,,,) > end The problem is that you're not telling SYS$BRKTHRU how to interpret the sendto argument (%DESCR('SWANGER')). You need to use the sndtyp argument as well. By the way, since FORTRAN passes strings as descriptors by default, you don't need the calls to %DESCR. You do need to pass the sndtyp argument by value, though. The following program should work for you: INCLUDE '($BRKDEF)' CALL SYS$BRKTHRU(,'Hello there!','SWANGER',%VAL(BRK$C_USERNAME),,,,,,,) END