CODE
Oracle Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
PSOUG Home Code Snippets Oracle Reference Oracle Functions PSOUG Forum Oracle Blogs Bookmark and Share
 
 Search the Reference Library pages:  

Free
Oracle Magazine
Subscriptions
and Oracle White Papers

Oracle UTL_LMS
Version 11.1
 
General Information
Purpose Retrieves and formats error messages in different languages
Source $ORACLE_HOME/rdbms/admin/utllms.sql
Dependencies
DBMS_SERVER_ALERT DBMS_UNDO_ADV UTL_LMS_LIB
Special Characters
Character Description
'%s' Substitute the next string argument
'%d' Substitute the next integer argument
'%%' Represents the special character %
 
FORMAT_MESSAGE

Formats a retrieved error message
utl_lms.format_message(
format IN VARCHAR2 CHARACTER SET ANY_CS,
args   IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL)
RETURN VARCHAR2 CHARACTER SET format%CHARSET;
set serveroutput on

DECLARE
 s VARCHAR2(32767);
 i PLS_INTEGER;
BEGIN
  i := utl_lms.get_message(26052,'rdbms','ora','french', s);

  dbms_output.put_line('before format, message is: ' || s);

  dbms_output.put_line('formatted message is: '||
  utl_lms.format_message(s, 96, 'my_string'));
END;
/
 
GET_MESSAGE

Retrieves an error message based on error number, product, facility, language, and message specified
utl_lms.get_message(
errnum   IN  PLS_INTEGER,
product  IN  VARCHAR2,
facility IN  VARCHAR2,
language IN  VARCHAR2,
message  OUT NOCOPY VARCHAR2CHARCTER SET ANY_CS)
RETURN PLS_INTEGER;
set serveroutput on

DECLARE
 s VARCHAR2(200);
 i PLS_INTEGER;
BEGIN
  i := utl_lms.get_message(601, 'rdbms', 'oci', 'German', s);
  dbms_output.put_line('OCI--00601 is: ' || s);
END;
/
 
Related Topics
Exception Handling
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us [76 users online]    © 2010 psoug.org