|
HP OpenVMS systems documentation |
Previous | Contents | Index |
Specifies the severity level to be associated with the messages that follow the .SEVERITY directive.
.SEVERITY level
level
Specifies the level of the condition that caused the message. The severity level codes are as follows:
SUCCESS Produces an S code in a message. INFORMATIONAL Produces an I code in a message. WARNING Produces a W code in a message. ERROR Produces an E code in a message. SEVERE Produces an F code in a message. FATAL Produces an F code in a message. The SEVERE parameter is equivalent to the FATAL parameter; they can be used interchangeably.
None.
Following the .FACILITY directive, the message source file generally contains a .SEVERITY directive. If you do not specify the severity on each message definition with one of the message definition severity qualifiers, you must include a .SEVERITY directive. If you attempt to define a message without specifying a severity level, an error results.A new .FACILITY directive cancels the previous severity level in effect.
.TITLE SAMPLE Error and Warning Messages .IDENT 'VERSION 4.00' .FACILITY SAMPLE,1/PREFIX=ABC_ .SEVERITY ERROR (1) UNRECOG < Unrecognized keyword !AS>/FAO_COUNT=1 AMBIG < Ambiguous keyword> .SEVERITY WARNING (2) .BASE 10 SYNTAX < Invalid syntax in keyword> .END |
(1) (2) The two .SEVERITY directives included in this message source file define the severity levels for three messages. The first two messages have a severity level of E; the third message has a severity level of W.
Specifies the module name and title text that is to appear at the top of each page of the output listing file.
.TITLE modname [listing-title]
modname
Specifies a character string of up to 31 characters that is to appear in the object module as the module name.listing-title
Defines the text to be used as the title of the listing. The title begins with the first nonblank character after the module name and continues through the next 28 characters. An exclamation point (!) within these 28 characters is treated as part of the title and not as a comment delimiter. The listing title has a maximum length of 28 characters and cannot be continued onto another line.
None.
.TITLE SAMPLE (1) Error and Warning Messages (2) .IDENT 'VERSION 4.00' .FACILITY SAMPLE,1/PREFIX=ABC_ .SEVERITY ERROR UNRECOG < Unrecognized keyword !AS>/FAO_COUNT=1 AMBIG < Ambiguous keyword> .SEVERITY WARNING .BASE 10 SYNTAX < Invalid syntax in keyword> .END |
(1) The module name of the object module produced by this file is SAMPLE.
(2) The title of the output listing is defined as "Error and Warning Messages."
The following examples demonstrate the use of message files and pointer files.
Creating an Executable Image Containing Message Data
The following example illustrates the steps involved in incorporating a message file within an executable image.
The message source file, TESTMSG.MSG, created with a text editor, contains the following lines:
.FACILITY TEST,1 /PREFIX=MSG_ .SEVERITY ERROR SYNTAX < Syntax error in string '!AS'>/FAO_COUNT=1 ERRORS < Errors encountered during processing> .END |
You compile the message source file by entering the following command:
$ MESSAGE TESTMSG |
You compile the FORTRAN source file by entering the following command:
$ FORTRAN TEST |
You link the message object module TESTMSG.OBJ to the FORTRAN object module TEST.OBJ by entering the following command:
$ LINK/NOTRACE TEST+TESTMSG |
You execute the image by entering the following command:
$ RUN TEST |
If an error occurs when you execute the program, the system displays the following messages:
%TEST-E-SYNTAX, Syntax error in string ABC%TEST-E-ERRORS, Errors encountered during processing |
Creating an Executable Image Containing a Pointer
The following example demonstrates how to create an executable image that contains a pointer to a nonexecutable message file.
You compile the message source COBOLMSG by entering the following command:
$ MESSAGE/NOSYMBOLS COBOLMSG |
You link the object module COBOLMSG.OBJ to create the nonexecutable message file by entering the following command:
$ LINK/SHAREABLE=SYS$MESSAGE:COBOLMF COBOLMSG.OBJ |
You create the pointer object module MESPNTR.OBJ, which contains a pointer to the nonexecutable message file COBOLMF.EXE, by entering the following command:
$ MESSAGE/FILE_NAME=COBOLMF /OBJECT=MESPNTR COBOLMSG |
You link the pointer object module MESPNTR.OBJ to the COBOL program object module COBOLCODE.OBJ by entering the following command:
$ LINK COBOLCODE,MESPNTR |
You execute the program by entering the following command:
$ RUN COBOLCODE |
The system then displays the messages defined in COBOLMSG.
Index | Contents |