function JJMESS( msgnum ) c. Print, on unit 6, the system message for "msgnum". c. c. This routine provides a way of determining the meaning of c. the return status from a system call; aborting, if desired, on c. error messages; and returning the status, as an integer, to c. the caller. c. c. A convienient way to print the system message and get the c. status as an integer is by using it to call a system service, e.g. c. c. iret= JJMESS( SYS$service(...) ) c. c. call JJMESSET( iunit, iaction ) c. To change the defaults of the JJMESS routine. c. C. iunit == The output unit (0=no_output) .. Default = 6 C. iaction == the action to be taken on a message C. 0 == Print errors, then return .. Default C. +1 == Print all messages c. +2 == ABORT, and thus TRACEBACK, If ERROR c. -end.of.info- c. INTEGER MSGNUM C------ CHARACTER MSG*255 C. DATA JUNIT/6/, JPRALL/0/, JABORT/0/ C. C...? OUTPUT THE MESSAGE C. IF( JUNIT.NE.0 .AND. 1 ( JPRALL.NE.0 .OR. .NOT.MSGNUM )) THEN C. CALL SYS$GETMSG( %VAL(MSGNUM), ILEN, MSG, %VAL(-1) , ) WRITE( JUNIT, 110 ) MSGNUM, MSG(1:ILEN ) 110 FORMAT( 1X, Z8, '=', A ) ENDIF C. C...? ABORT THE PROGRAM C. IF( JABORT.NE.0 .AND. .NOT.MSGNUM ) THEN C. CALL LIB$STOP( %VAL(MSGNUM) ) ENDIF C. JJMESS = MSGNUM C. RETURN C. ......... C. C++++++ C. C. ENTRY JJMESSET( IUNIT, IACTION ) C------ JUNIT = IUNIT JPRALL = IACTION.AND.1 JABORT = IACTION.AND.2 RETURN C. ......... end