Program MSGRCV c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c c Dr. Klaus P. Schneider May 1988 c c This Routine uses the TSXLIB routine RCVMSG to receive a Message from c Channel NAMEN, and the TSXLIB routine TRMOUT to write the message c to the screen. c c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c LOGICAL*1 ICHNAM(7),MSGBUF(38) C..... Generate Name for Message channel CALL SCOPY ('NAMEN',ICHNAM,5) ICHNAM(6)="0 C..... receive a message IBUFSZ = 38 CALL RCVMSG ( ICHNAM,MSGBUF,IBUFSZ,MSGSIZ,IERR ) C..... Test Errorflags TYPE *,' Errorflag : ',IERR TYPE *,' Message size : ', MSGSIZ IF ( IERR .LT. 0 ) TYPE 555 555 FORMAT(//,3X,' The message received from Channel NAME is :',$) IF ( IERR .EQ. 0 ) then TYPE *,' Job does not have MESSAGE privilege' ELSE IF ( IERR .EQ. 1 ) then TYPE *,' all message channels are busy ' ELSE IF ( IERR .EQ. 2 ) then TYPE *,' max. # of Messages in MSG queue ' ELSE IF ( IERR .EQ. 3 ) then TYPE *,' no message was queued on this channel ' ELSE IF ( IERR .EQ. 4 ) then TYPE *,' Message ist to long ' ELSE IF ( IERR. EQ. 5 ) then TYPE *,' max # of pending MSG requests ' ENDIF CALL TRMOUT ( MSGBUF, MSGSIZ ) ! SHOW MESSAGE STOP END