Retrieve Short Name (QDBRTVSN) API


  Required Parameter Group:

1 Qualified Start of changeobjectEnd of change name Output Char(20)
2 Long Start of changeobjectEnd of change name Input Char(128)
3 Length of long Start of changeobjectEnd of change name Input Binary(4)
4 Library name Input Char(10)
5 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve Short Name(QDBRTVSN) API allows you to get the 10-character Start of changeobjectEnd of change name of a database file Start of changeor libraryEnd of change by providing the long Start of changeobjectEnd of change name. The information is returned as a qualified Start of changeobjectEnd of change 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.)


Authorities and Locks

Start of changeObjectEnd of change Authority
*OBJOPR

Required Parameter Group

Qualified Start of changeobjectEnd of change name
OUTPUT; CHAR(20)

The short Start of changeobjectEnd of change name being retrieved and the library in which it is located. The first 10 bytes contain the Start of changeobjectEnd of change 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. Start of changeIf the object being retrieved is a library, the second 10 bytes will contain 'QSYS'.End of change If the 20 bytes are blanks, this means the Start of changeobjectEnd of change name could not be returned.

Long Start of changeobjectEnd of change name
INPUT; CHAR(128)

The long Start of changeobjectEnd of change name from which the short name will be retrieved.

Length of long Start of changeobjectEnd of change name
INPUT; BINARY(4)

The length of the long Start of changeobjectEnd of change name.

Library name
INPUT; CHAR(10)

The name of the library of the Start of changeobjectEnd of change. If you use Start of change*CURLIB or *LIBLEnd of change, the actual name of the library will be returned in the qualified Start of changeobjectEnd of change name parameter. You can use the following special values:

*CURLIB The job's current library.
*LIBL The library list.
Start of changeblank Indicates that the input long name is a long library name and the library short name will be returned.End of change

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Error Messages

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.
Start of changeCPF9810 E Library &1 not found.End of change


API introduced: V3R7

[ Back to top | Database and File APIs | APIs by category ]