| General Information |
| Purpose |
Procedural Gateway specific routines to manipulate raws. This package provides SQL functions for raws
which convert various non-Oracle number formats to/from raws. Included is conversion support for: IBM/370 vs COBOL II |
| Source |
{ORACLE_HOME}/rdbms/admin/utlpg.sql
{ORACLE_HOME}/rdbms/admin/prvtpgb.plb |
| First Availability |
1993 but is not part of the default database installation |
| Dependencies |
STANDARD only |
| Exceptions |
| Exception # |
Description |
| ORA-8401 |
Invalid compiler name |
| ORA-8414 |
Error encounterred |
| ORA-8429 |
Raw data has invalid digit in display type data |
| ORA-8430 |
Raw data missing leading sign |
| ORA-8431 |
Raw data missing zero as defined in picture |
| ORA-8433 |
Invalid picture type in convert raw to number |
| ORA-8434 |
Raw data has invalid trailing sign |
| ORA-8435 |
Picture mask missing leading sign |
| ORA-8436 |
Raw data has invalid sign digit |
| ORA-8437 |
Invalid picture type in picture mask |
| ORA-8441 |
Closed parenthesis is missing in picture mask |
| ORA-8443 |
synt error in BLANK WHEN ZERO clause in mask options |
| ORA-8444 |
synt error in JUSTIFIED clause in mask options |
| ORA-8445 |
synt error in SIGN clause in mask options |
| ORA-8446 |
synt error in SYNCHRONIZED clause in mask options |
| ORA-8447 |
synt error in USAGE clause in mask options |
| ORA-8448 |
synt error in DECIMAL-POINT environment clause |
| ORA-8449 |
Invalid numeric symbol found in picture mask |
| ORA-8450 |
Invalid specification of CR in picture mask |
| ORA-8451 |
Invalid specification of DB in picture mask |
| ORA-8452 |
Specification of E in picture mask unsupported |
| ORA-8453 |
More than one V symbol specified in picture mask |
| ORA-8454 |
More than one S symbol specified in picture mask |
| ORA-8455 |
synt error in CURRENCY SIGN environment clause |
| ORA-8456 |
No sign in picture mask but SIGN clause in mask options |
| ORA-8457 |
synt error in SEPARATE CHARACTER option of SIGN clause |
| ORA-8460 |
Invalid environment clause in environment parameter |
| ORA-8462 |
Raw buffer contains invalid decimal data |
| ORA-8463 |
Overflow converting decimal number to Oracle number |
| ORA-8464 |
Input raw decimal data contains more than 42 digits |
| ORA-8466 |
Raw buffer length <len> to short for <type> |
| ORA-8468 |
Mask option <option> is not supported |
| ORA-8469 |
Must use the SIGN IS SEPARATE clause in mask options |
| ORA-8498 |
Picture mask overrides mask option USAGE ... to DISPLAY |
| ORA-8499 |
Picture mask options ignored by UTL_PG |
|
| Security Model |
Owned by SYS with no granted privileges |
| |
| MAKE_NUMBER_TO_RAW_FORMAT |
| Make a number_to_raw format conversion specification used to convert an Oracle number of declared
precision and scale to a raw byte-string in the remote host internal format specified by mask, maskopts, envrnmnt, compname, and compopts |
utl_pg.make_number_to_raw_format(
mask IN VARCHAR2,
maskopts IN VARCHAR2,
envrnmnt IN VARCHAR2,
compname IN VARCHAR2,
compopts IN VARCHAR2,
nlslang IN VARCHAR2,
wind IN BOOLEAN,
wmsgbsiz IN BINARY_INTEGER,
wmsgblk OUT RAW) RETURN RAW; |
set serveroutput on
DECLARE
r1 RAW(32767);
r2 RAW(32767);
BEGIN
r1 := utl_pg.make_number_to_raw_format('999.00', 'COMP-4', 'DECIMAL-POINT IS COMMA', 'IBMVSCOBOLII', NULL, 'AMERICAN_AMERICA.WE8EBCDIC37C', TRUE, 1024, r2);
dbms_output.put_line('R1: ' || r1);
dbms_output.put_line(' ');
dbms_output.put_line('R2: ' || r2);
END;
/ |
| |
| MAKE_RAW_TO_NUMBER_FORMAT |
| Make a raw_to_number format conversion specification used to convert a raw byte-string from the
remote host internal format specified by mask, maskopts, envrnmnt, compname, and compopts into an Oracle number of comparable precision and scale |
utl_pg.make_raw_to_number_format(
mask IN VARCHAR2,
maskopts IN VARCHAR2,
envrnmnt IN VARCHAR2,
compname IN VARCHAR2,
compopts IN VARCHAR2,
nlslang IN VARCHAR2,
wind IN BOOLEAN,
wmsgbsiz IN BINARY_INTEGER,
wmsgblk OUT RAW)
RETURN RAW; |
set serveroutput on
DECLARE
r1 RAW(32767);
r2 RAW(32767);
BEGIN
r1 := utl_pg.make_raw_to_number_format('999.00', 'COMP-4', 'DECIMAL-POINT IS COMMA', 'IBMVSCOBOLII', NULL, 'AMERICAN_AMERICA.WE8EBCDIC37C', TRUE, 1024, r2);
dbms_output.put_line('R1: ' || r1);
dbms_output.put_line(' ');
dbms_output.put_line('R2: ' || r2);
END;
/ |
| |
| NUMBER_TO_RAW |
| Convert an Oracle number to a raw byte-string in the remote host internal format specified by
mask, maskopts, envrnmnt, compname, and compopts |
utl_pg.number_to_raw(
n IN NUMBER,
mask IN VARCHAR2,
maskopts IN VARCHAR2,
envrnmnt IN VARCHAR2,
compname IN VARCHAR2,
compopts IN VARCHAR2,
nlslang IN VARCHAR2,
wind IN BOOLEAN,
wmsgbsiz IN BINARY_INTEGER,
wmsgblk OUT RAW)
RETURN RAW; |
| TBD |
| |
| NUMBER_TO_RAW_FORMAT |
| Convert, according to the number_to_raw conversion format n2rfmt, an Oracle
number numval to a raw byte-string in the remote host internal format |
utl_pgnumber_to_raw_format(numval IN NUMBER, n2rfmt IN RAW) RETURN RAW; |
| TBD |
| |
| RAW_TO_NUMBER |
| Convert a raw byte-string from the remote host internal format specified
by mask, maskopts, envrnmnt, compname, and compopts into an Oracle number. |
utl_pg.raw_to_number(
r IN RAW,
mask IN VARCHAR2,
maskopts IN VARCHAR2,
envrnmnt IN VARCHAR2,
compname IN VARCHAR2,
compopts IN VARCHAR2,
nlslang IN VARCHAR2,
wind IN BOOLEAN,
wmsgbsiz IN BINARY_INTEGER,
wmsgblk OUT RAW)
RETURN NUMBER; |
| TBD |
| |
| RAW_TO_NUMBER_FORMAT |
| Convert, according to the raw_to_number conversion format r2nfmt, a raw
byte-string rawval in the remote host internal format to an Oracle number |
utl_pg.raw_to_number_format(rawval IN RAW, r2nfmt IN RAW) RETURN NUMBER; |
| TBD |
| |
| WMSG |
| Extract a warning message specified by wmsgitem from wmsgblk |
utl_pg.wmsg(
wmsgblk IN RAW,
wmsgitem IN BINARY_INTEGER,
wmsgno OUT BINARY_INTEGER,
wmsgtext OUT VARCHAR2,
wmsgfill OUT VARCHAR2)
RETURN BINARY_INTEGER; |
| TBD |
| |
| WMSGCNT |
| Tests a wmsgblk to determine how many warnings (if any) may be present |
utl_pg.wmsgcnt(wmsgblk IN RAW) RETURN BINARY_INTEGER; |
| TBD |