getMessage()

The system function SysLib.getMessage returns a message from the file that is referenced in the Java™ runtime property vgj.message.file. You can specify inserts for inclusion in the message. After retrieving the message, you can display it in a text form, print form, console form, Web page, or log file.

  SysLib.getMessage(
    key STRING in
    [, insertArray STRING[] in])
  returns (result STRING)
result
A field of type STRING.
key
A character field or literal of type STRING. This parameter provides the key into the properties file that is used at run time. If the key is blank, the message is a concatenation of message inserts.
insertArray
An array of type STRING. Each element contains an insert for inclusion in the message being retrieved.
In the message text, the substitution symbol is an integer surrounded by braces, as in this example from a properties file:
  VGJ0216E = {0} is not a valid date mask for {1}.

The first element in insertArray is assigned to the placeholder numbered zero, the second is assigned to the placeholder numbered one, and so forth.

The format of the file referenced by Java runtime property vgj.messages.file is the same as for any Java properties file. For details on that format, see Program properties file.

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.