Important

   

This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 22.1 for BMC Helix Operations Management. Open link

msg_check()

Validate a message ID and catalog.

Syntax

msg_check(message_ID)

Parameter

ParameterDefinition

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

Note

This function provides support for internationalized PSL scripts. For more information about internationalization, see Internationalized PSL Scripts. 

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"

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");

The previous commands produce the following output:

msg_check[DEMO_HELLO]=1
msg_check[1142785]=1

Was this page helpful? Yes No Submitting... Thank you

Comments