List Database Relations (QDBLDBR) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The List Database Relations (QDBLDBR) API gives relational information about database files. The information identifies the physical and logical files that are dependent on a specific file, files that use a specific record format, or file members that are dependent on a specific file member. The information is placed in a user space specified by you.

Similar in function to the Display Database Relations (DSPDBR) command, this API allows more input parameter values than does the command. Also, your program can have more direct access to the information put in the user space by this API than when the command places similar information in an output file.

The information generated by this API replaces any existing information in the user space. It does not append information to any information already in the user space. If the space is bigger than needed, the contents of the remainder of the space are not changed. If the space is not big enough, it is extended.


Authorities and Locks

User Space Authority
*CHANGE
User Space Library Authority
*EXECUTE
User Space Lock
*EXCLRD
File Authority
*USE
File Library Authority
*USE
File Lock
*SHRNUPD

Required Parameter Group

Qualified user space name
INPUT; CHAR(20)

The user space that is to receive the database relations information. The first 10 characters contain the user space name, and the second 10 characters contain the name of the library where the user space is located. You can use these special values for the library name:



Format
INPUT; CHAR(8)

The content and format of the information to be returned about the specified file, member, or record format. One of the following format names must be used:


For more information, see DBRL0100 Format (File), DBRL0200 Format (Member), or DBRL0300 Format (Record Format).

Qualified file name
INPUT; CHAR(20)

The name of the file for which database relations information is to be extracted. The first 10 characters contain the file name, and the second 10 characters contain the name of the library where the file is located. The file name cannot be a DDM file. The file name can be a specific file name, a generic name, or the following special value:


You can use these special values for the library name:


Member
INPUT; CHAR(10)

The name of the member to be used for retrieving database relations for format DBRL0200. This value can be a specific member name, a generic member name, or one of the following special values:


This parameter is ignored for formats DBRL0100 and DBRL0300.

Record format
INPUT; CHAR(10)

The name of the record format to be used for retrieving database relations for format DBRL0300. This value can be a specific record format, a generic record format, or the following special value:


This input is ignored for formats DBRL0100 and DBRL0200.

Error code
I/O; CHAR(*)

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


Format of the Generated List

The database relations list consists of an input parameter section and one of three possible formats for the list data section. The three formats are determined by the kind of information you are looking for. The format names are:



The layout of the contents of the user space is determined by the format used. The following tables show how the contents of the input parameter section and the data format sections are organized. For descriptions of each field, see Field Descriptions.


Input Parameter Section



DBRL0100 Format (File)

The structure of the information returned is determined by the value specified for the format name. The DBRL0100 format includes information on files dependent on the file specified. The following table shows how this information is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



DBRL0200 Format (Member)

The structure of the information returned is determined by the value specified for the format name. The DBRL0200 format includes information on files and members dependent on the file member specified. The following table shows how this information is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



DBRL0300 Format (Record Format)

The structure of the information returned is determined by the value specified for the format name. The DBRL0300 format includes information on files dependent on the record format specified. The following table shows how this information is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



Field Descriptions

Constraint library name. The name of the library containing the file to which the constraint applies.

Constraint name. The name of the constraint. This only applies when the dependency type is C.

Constraint name length. The length of the constraint name. Delimited names can be a maximum of 258 characters and non-delimited names a maximum of 128 characters.

Dependency type. How a file or member is related to the file or member specified with the QDBLDBR API. Possible values are:


Dependent file name. The name of the file that is dependent on the file specified using the QDBLDBR API. If no dependent files are found for the file specified, the dependent file name is *NONE.

Dependent library name. The name of the library that the dependent file is in. If there are no dependent files found for the file specified, the dependent library name is blank.

Dependent member name. The name of the file member that is dependent on the file member specified using the QDBLDBR API. If no dependent members are found for the member specified, the dependent member name is *NONE.

File library name specified. The name of the library containing the file for which the database relations information is requested.

File library name used. The name of the library containing the file used to extract the database relations information in this list entry.

File name specified. The name of the file for which the database relations information is to be extracted.

File name used. The name of the file used to extract the database relations information in this list entry.

Format name. The name of the format in which the database relations information is returned to the user space.

Join file number. If the file for which database relations information is being extracted is a join logical file, this is the ordinal number of the file in the JFILE to which the dependency relates. The join file number is zero if either of the following are correct:

Join reference number. If the dependent file listed is a join logical file, this is the ordinal number of the file in the JFILE to which this dependency relates. The join reference number is zero if either of the following are correct:

Member name specified. The name of the member for which the information is extracted.

Member name used. The name of the member used to extract the database relations information in this list entry.

Record format name specified. The name of the record format for which the information is displayed.

Record format name used. The name of the record format used to extract the database relations information in this list entry.

Reserved. An ignored field.

User space library name. The name of the library that contains the user space that receives the database relations information requested.

User space name. The name of the user space that receives the database relations information requested.


Error Messages




API introduced: V2R2

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