Retrieve Short Name (QDBRTVSN) API


  Required Parameter Group:

1 Qualified file name Output Char(20)
2 Long file name Input Char(128)
3 Length of long file 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) APIallows you to get the 10-character file name of a database file by providing the long file name of the database file. The information is returned as a qualified file name.


Authorities and Locks

File Authority
*OBJOPR

Required Parameter Group

Qualified file name
OUTPUT; CHAR(20)

The short file name being retrieved and the library in which it is located. The first 10 bytes contain the file 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 20 bytes are blanks, this means the file name could not be returned.

Long file name
INPUT; CHAR(128)

The long file name from which the short name will be retrieved.

Length of long file name
INPUT; BINARY(4)

The length of the long file name.

Library name
INPUT; CHAR(10)

The name of the library of the file. If you use one of the special values, the actual name of the library will be returned in the qualified file name parameter. You can use the following special values for the library name:

*CURLIB The job's current library.
*LIBL The library list.

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.


API introduced: V3R7
Top | Database and File APIs | APIs by category