1 PACKAGE utl_lms AS
2 /*
3 * FUNCTION: GET_MESSAGE
4 * Retrieve a LMS message based on error number, product, facility
5 * and language.
6 *
7 * PARAMETERS
8 * errnum - The error number, for example, 972 for ORA-00972 message.
9 * product - Product of the LMS message. For example, 'rdbms'.
10 * facility - Facility of the LMS message. For example, 'ora'.
11 * language - Language of the LMS message. By default, it is NULL.
12 * Note: if this parameter is left null, the language
13 * used will be derived from the character set of the
14 * message parameter.
15 * message - Output the retrieved message.
16 * RETURN
17 * 0 when success
18 * -1 when fail
19 * EXCEPTIONS
20 * miscellaneous runtime exceptions.
21 * NOTES
22 * A nls_lang style value can be supplied as the 'language' argument,
23 * though only the language element is functionally significant to the
24 * result. Any character set secified in the language value is ignored
25 * as the encoding of the output mesage is determined by the context
26 * of the plsql call.
27 */
28 FUNCTION get_message(errnum IN PLS_INTEGER,
29 product IN VARCHAR2,
30 facility IN VARCHAR2,
31 language IN VARCHAR2,
32 message OUT NOCOPY VARCHAR2 CHARACTER SET ANY_CS)
33 RETURN PLS_INTEGER;
34
35 /*
36 * FUNCTION:
37 * Format the retrieved LMS message.
38 *
39 * Format string special characters
40 * '%s' - substitute next string argument
41 * '%d' - substitute next integer argument
42 * '%%' - special character '%'
43 *
44 * PARAMETERS
45 * format - Formatting string.
46 * args - Subtitution arguments list.
47 * RETURN
48 * Fomatted result on success.
49 * NULL on failure.
50 * EXCEPTIONS
51 * miscellaneous runtime exceptions.
52 */
53 FUNCTION format_message(format IN VARCHAR2 CHARACTER SET ANY_CS,
54 args ...)
55 RETURN VARCHAR2 CHARACTER SET format%CHARSET;
56
57 END utl_lms;