msg_check()
Validate a message ID and catalog.
Syntax
msg_check(message_ID)
Parameter
Parameter | Definition |
---|---|
message_ID | integer that identifies a message |
Description
The msg_check() function checks whether a message is valid and the message catalog is available. This function returns the following values:
Return Value | Definition |
---|---|
0 | catalog is available and contains the message |
1 | catalog is not available |
2 | catalog is available but does not contain the message |
3 | unknown message service error occurred |
Example
The following example shows a sample message catalog:
VENDOR_ID 1
VENDOR BMC Software
TOOL_ID 23
TOOL PATROL Demo
VERSION 1.0
DATE 13-Mar-1997
#----------------------------------------------------
ID 1 DEMO_HELLO INFO CURRENT
MESSAGE "Hello World"
VENDOR BMC Software
TOOL_ID 23
TOOL PATROL Demo
VERSION 1.0
DATE 13-Mar-1997
#----------------------------------------------------
ID 1 DEMO_HELLO INFO CURRENT
MESSAGE "Hello World"
The following example of the msg_check() function uses the preceding message catalog:
print("msg_check[DEMO_HELLO]=", msg_check(DEMO_HELLO),"\n");
print("msg_check[1142785]=", msg_check(1142785), "\n");
print("msg_check[1142785]=", msg_check(1142785), "\n");
The previous commands produce the following output:
msg_check[DEMO_HELLO]=1
msg_check[1142785]=1
msg_check[1142785]=1