1 | Qualified object name | Output | Char(20) |
2 | Long object name | Input | Char(128) |
3 | Length of long object name | Input | Binary(4) |
4 | Library name | Input | Char(10) |
5 | Error code | I/O | Char(*) |
The Retrieve Short Name(QDBRTVSN) API allows you to get the 10-character object name of a database file or library by providing the long object name. The information is returned as a qualified object name. (Objects with long object names can be created using SQL CREATE statements. An object with a long name also has a short 10-character name.)
The short object name being retrieved and the library in which it is located. The first 10 bytes contain the object name, and the second 10 bytes contain the library name. If the input library name is *LIBL, or *CURLIB, the library name will be returned. If the object being retrieved is a library, the second 10 bytes will contain 'QSYS'. If the 20 bytes are blanks, this means the object name could not be returned.
The long object name from which the short name will be retrieved.
The length of the long object name.
The name of the library of the object. If you use *CURLIB or *LIBL, the actual name of the library will be returned in the qualified object name parameter. You can use the following special values:
*CURLIB | The job's current library. |
*LIBL | The library list. |
blank | Indicates that the input long name is a long library name and the library short name will be returned. |
The structure in which to return error information. For the format of the structure, see Error code parameter.
Message ID | Error Message Text |
---|---|
CPF2207 E | Not authorized to use object &1 in library &3 type *&2. |
CPF24B4 E | Severe error while addressing parameter list. |
CPF3C22 E | Cannot get information about file &1. |
CPF5715 E | File &1 in library &2 not found. |
CPF9810 E | Library &1 not found. |
[ Back to top | Database and File APIs | APIs by category ]