Retrieve Database File Description (QDBRTVFD) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Qualified returned file name Output Char(20)
4 Format name Input Char(8)
5 Qualified file name Input Char(20)
6 Record format name Input Char(10)
7 Override processing Input Char(1)
8 System Input Char(10)
9 Format type Input Char(10)
10 Error Code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Conditional; see Usage Notes.

The Retrieve Database File Description (QDBRTVFD) API allows you to get complete and specific information about a file on a local or remote system. The information is returned to a receiver variable in either a file definition template or a format definition mapping. The file definition template provides more complete information about a database file than the Display File Description (DSPFD) command. The format definition provides complete information on the record formats of the file.

The format definition is used with the Query (QQQQRY) API to get data from a file. You can run the QDBRTVFD API to build a format definition that is later used to run a query. This format definition can be used several times to extract information from a database, making the Query API run faster. If the format definition is not created prior to running a query, the QQQQRY API must create one when it runs.


Authorities and Locks

Library Authority
*EXECUTE
File Authority
*OBJOPR
File Lock
*SHRNUP

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that is to receive the information requested. You can specify the size of the area smaller than the format requested as long as you specify the length of receiver variable parameter correctly. As a result, the API returns only the data the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable provided. The length of receiver variable parameter may be specified up to the size of the receiver variable specified in the user program. If the length of receiver variable parameter specified is larger than the allocated size of the receiver variable specified in the user program, the results are not predictable. The minimum length is 8 bytes.

Qualified returned file name
OUTPUT; CHAR(20)

The actual qualified file name from which the file description has been extracted. If an override is active this file and library name may be different from the one entered with the API.

Format name
INPUT; CHAR(8)

The content and format of the information to be returned about the specified file, member, or format. You can use the following format names:

FILD0100 File definition template
FILD0200 Format definition template
FILD0300 Key field information template
FILD0400 Trigger information template

See Format of Generated Information for a description of these formats.

Qualified file name
INPUT; CHAR(20)

The name of the file about which the information is to be extracted and the library in which it is located. The first 10 characters contain the file name, and the second 10 characters contain the library name.

You can use the following special values for the library name:

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

Record format name
INPUT; CHAR(10)

The name of the record format in the specified file that is to be used to generate the file description. (This parameter is used only with format FILD0200.)

You can use the following special value for the record format name

*FIRST The first record format found

Override processing
INPUT; CHAR(1)

Whether overrides are to be processed. The following values are used:

0 No override processing
1 Override processing

System
INPUT; CHAR(10)

Whether the information that is returned is about a file on either a local or remote system, or both. The possible values are:

*LCL The information returned is about local files only.
*RMT The information returned is about remote files only.
*FILETYPE The information returned is about files on both the local and remote systems. For DDM files, the information returned is about the remote file that was named on the RMTFILE parameter of the Create DDM File (CRTDDMF) command.

Format type
INPUT; CHAR(10)

Whether the logical formats returned are internal or external. (This parameter is used only with format FILD0200.) A description and examples of the internal (*INT) and external (*EXT) formats follow:

*EXT The formats returned are external. If the specified file is a logical file, the format returns data for the logical fields defined in the logical record format. If the specified file is a physical file, the internal and external field names are the same.
*INT The formats returned are internal. If the specified file is a logical file, the format returns data for the fields on which the logical fields are based. If the specified file is a physical file, the internal and external field names are the same.

The following are DDS, *EXT, and *INT format type examples: For a logical file definition of (1) that is based on a physical file definition of (2), a format type of *EXT would return (3) and a format type of *INT would return (4).


  Format Type Example DDS

  Logical file definition (1):

  R CONCAT1 PFILE(PF1)
  LFLD1 RENAME(FLD1)
  FLD2  
  CATFLD CONCAT(FLD1 FLD2 FLD3)
  K CATFLD  

  Physical file definition (2):

  FLD1 5A
  FLD2 10A
  FLD3 5A
  K FLD1  




  Format Type *EXT Example
  (3)

  Record format name CONCAT1
  Record length 35
  Number of fields 3
      Internal field name 1 FLD1
      External field name 1 LFLD1
      Length of field 1 5
      Internal field name 2 FLD2
      External field name 2 FLD2
      Length of field 2 10
      Internal field name 3 FLD1
      External field name 3 CATFLD
      Length of field 3 20




  Format Type *INT Example
  (4)
  Record format name CONCAT1
  Record length 35
  Number of fields 5
      Internal field name 1 FLD1
      External field name 1 LFLD1
      Length of field 1 5
      Internal field name 2 FLD2
      External field name 2 FLD2
      Length of field 2 10
      Internal field name 3 FLD1
      External field name 3 CATFLD
      Length of field 3 5
      Internal field name 4 FLD2
      External field name 4 CATFLD
      Length of field 4 10
      Internal field name 5 FLD3
      External field name 5 CATFLD
      Length of field 5 5


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 Generated Information

The QDBRTVFD API can be used to provide information in the following formats:

FILD0100 File definition template
FILD0200 Format definition template
FILD0300 Key field information template
FILD0400 Trigger information template

The following sections provide an overview of each of these formats. If an offset equals zero in the returned information, there is no corresponding structure associated with it.

The asterisk (*) in the Field column represents a reserved field. No variable is associated with these reserved fields.


FILD0100 Format (File Definition Template (FDT) header)

FILD0100 provides detailed information about how the file is built. FILD0100 Format shows how this information is organized. When more than one entry can appear, the figure indicates this as in (5).

Descriptions of the fields in this structure follow FILD0100 Format. The include source is supplied on the system, in source file H, member name QDBRTVFD, in the QSYSINC library. The field names in the following tables apply only to the ILE C include. Refer to Include files and the QSYSINC Library for the names of the OPM and ILE RPG and COBOL includes.

FILD0100 Format

FILD0100 Format


File Definition Header (Qdb_Qdbfh)

Qdb_Qdbfh is the first structure and is located at offset zero of the returned data.

Offset Bit Type Field Description
Dec Hex
0 0   BINARY(4) Qdbfyret Length of the data returned in bytes.
4 4   BINARY(4) Qdbfyavl Number of bytes provided for the file definition data.
8 8   BIT(16) Qdbfhflg Attributes bytes.
8 8 0 BIT(2) Reserved_1 Reserved.
8 8 2 BIT(1) Qdbfhfpl Type of file. If on, the file is a logical database file. If off, a physical database file.
8 8 3 BIT(1) Reserved_2 Reserved.
8 8 4 BIT(1) Qdbfhfsu File type (FILETYPE). If on, the file is a source file (*SRC). If off, a data file (*DATA).
8 8 5 BIT(1) Reserved_3 Reserved.
8 8 6 BIT(1) Qdbfhfky Access path. If on, the file has a keyed sequence access path. If off, an arrival sequence access path.
8 8 7 BIT(1) Reserved_4 Reserved.
9 9 0 BIT(1) Qdbfhflc Record format level check (LVLCHK). If on, the record format level identifiers are checked when the file is opened (*YES) if off, they are not checked when the file is opened (*NO).
9 9 1 BIT(1) Qdbfkfso Select/omit. If on, the file is a select/omit logical file.
9 9 2 BIT(4) Reserved_5 Reserved.
9 9 6 BIT(1) Qdbfigcd Double-byte character set (DBCS) or Graphic data. If on, the file's record format(s) contains DBCS or Graphic data fields.
9 9 7 BIT(1) Qdbfigcl Double-byte character set (DBCS) or Graphic literals. If on, the file's record format(s) contains DBCS or Graphic literals.
10 A   CHAR(4) Reserved_7 Reserved.
14 E   BINARY(2) Qdbflbnum Number of data members. 0 indicates an externally described physical file or a program described physical file that is not linked to a data dictionary. 1 through 32 indicates the number of data dictionary record formats for a program described physical file that is linked to a data dictionary or the number of based-on physical records for a logical file.
16 10   CHAR(13) Qdbfkdat Keyed sequence access path description. If this file has an arrival sequence access path, these fields are not applicable.
16 10   BINARY(2) Qdbfknum Number of key fields for the file. 1 through 120.
18 12   BINARY(2) Qdbfkmxl Maximum key length for the file. 1 through 2000.
20 14   CHAR(1) Qdbfkflg Keyed sequence access path attributes.
20 14 0 BIT(1) Reserved_8 Reserved
20 14 1 BIT(1) Qdbfkfcs Alternate collating sequence (ALTSEQ). If on, an alternate collating sequence table is specified for the file.
20 14 2 BIT(4) Reserved_9 Reserved.
20 14 6 BIT(1) Qdbfkfrc Force keyed access path (FRCACCPTH). If on, the access path and changed records are forced to auxiliary storage when the access path is changed (*YES).
20 14 7 BIT(1) Qdbfkflt Floating point key indicator. If on, the access path for the file contains floating point keys.
21 15
CHAR(1) Qdbfkfdm Access path maintenance (MAINT).
I
Immediate maintenance (*IMMED)
D
Delayed maintenance (*DLY)
R
Rebuild maintenance (*REBLD)
22 16   CHAR(8) Reserved_10 Reserved.
30 1E   CHAR(10) Qdbfhaut Public authority (AUT).
*CHANGE
Public change authority
*ALL
Public all authority
*USE
Public use authority
*EXCLUDE
Public exclude authority
authorization-list-name
The name of the authorization list whose authority is used for the file. This is the original public authority that the file was created with, not the current public authority for the file.
40 28   CHAR(1) Qdbfhupl Preferred storage unit (UNIT).
X'00'
The storage space and its members can be allocated on the available auxiliary storage unit (*ANY).
X'01' through X'FF'
The unit identifier of an auxiliary storage unit on the system.
41 29   BINARY(2) Qdbfhmxm Maximum members (MAXMBRS).
0
No maximum is specified; 32,767 is used (*NOMAX).
1 through 32,767
The maximum number of members the file can have.
43 2B   BINARY(2) Qdbfwtfi Maximum file wait time (WAITFILE).
-1
The default wait time specified in the class description is used (*CLS).
0
The program does not wait for the file; an immediate allocation is required (*IMMED).
1 through 32,767
The number of seconds a program waits for the file.
45 2D   BINARY(2) Qdbfhfrt Records to force a write (FRCRATIO).
0
There is force write ratio.
1 through 32,767
The number of inserted, updated, or deleted records that are explicitly forced to storage.
47 2F   BINARY(2) Qdbfhmnum Number of members, 0 through 32,767.
Start of Change49 31   BINARY(2) Qdbfapsize Access path page size; -1 is not valid because access path is a 4 gigabyte access path; 0 is system determines page size from the key length of the access path; 8K,16K,32K,64K,128K,256K,512K bytes.End of Change
51 33   CHAR(7) Reserved_11 Reserved.
58 3A   BINARY(2) Qdbfbrwt Maximum record wait time (WAITRCD).
-2
The default wait time allowed by the system is used (*NOMAX).
-1
The program does not wait for the record, an immediate allocation is required (*IMMED).
1 through 32,767
The number of seconds a program waits for the record.
60 3C
CHAR(1) Qaaf Additional attribute flags.
60 3C 0 BIT(7) Reserved_12 Reserved
60 3C 7 BIT(1) Qdbfpgmd Program described file indicator. If on, the file is program described.
61 3D
BINARY(2) Qdbffmtnum Total number of record formats, 1 through 32.
63 3F
CHAR(2) Qdbfhfl2 Additional attribute flags
63 3F 0 BIT(1) Qdbfjnap Access path journaled.
63 3F 1 BIT(1) Reserved_13 Reserved.
63 3F 2 BIT(4)
File capability/operation flags.
63 3F 2 BIT(1) Qdbfrdcp Allow read operation. If on, records are not allowed to be read from the file.
63 3F 3 BIT(1) Qdbfwtcp Allow write operation. If on, records are not allowed to be written to the file.
63 3F 4 BIT(1) Qdbfupcp Allow update operation (ALWUPD). If on, records are not allowed to be updated in the file (*NO).
63 3F 5 BIT(1) Qdbfdlcp Allow delete operation (ALWDLT). If on, records are not allowed to be deleted from the file (*NO).
63 3F 6 BIT(9) Reserved_14 Reserved.
64 40 7 BIT(1) Qdbfkfnd Null values cause duplicates indicator (UNIQUE). Only valid if Qdbfpact is equal to 'KU'. If on, null values do not cause duplicate keys in the file access path(s) (*EXCNULL).
65 41
BINARY(2) Qdbfvrm First supported version release modification level. New database support is used in the file that will prevent it from being saved and restored to a prior version, release, and modification level.
X'0000'
Pre-Version 2 Release 1 Modification 0 file.
X'1500'
Version 2 Release 1 Modification 0 V2R1M0 file.
X'1501'
Version 2 Release 1 Modification 1 V2R1M1 file.
X'1600'
Version 2 Release 2 Modification 0 V2R2M0 file.
X'1700'
Version 2 Release 3 Modification 0 V2R3M0 file.
X'1F00'
Version 3 Release 1 Modification 0 V3R1M0 file.
X'2000'
Version 3 Release 2 Modification 0 V3R2M0 file.
X'2400'
Version 3 Release 6 Modification 0 V3R6M0 file.
X'2500'
Version 3 Release 7 Modification 0 V3R7M0 file.
X'2900'
Version 4 Release 1 Modification 0 V4R1M0 file.
X'2A00'
Version 4 Release 2 Modification 0 V4R2M0 file.
X'2B00'
Version 4 Release 3 Modification 0 V4R3M0 file.
X'2C00'
Version 4 Release 4 Modification 0 V4R4M0 file.
67 43
CHAR(2) Qaaf2 Additional attribute flags.
67 43 0 BIT(1) Qdbfhmcs Multiple coded character set identifier indicator (CCSID). If on, the file has more than one CCSID for its input and output character type fields. If the file has no character type fields, this bit is off.
67 43 1 BIT(1) Reserved_15 Reserved.
67 43 2 BIT(1) Qdbfknll Allow null value key indicator (ALWNULL). If on, null value keys are allowed.
67 43 3 BIT(1) Qdbf_nfld Allow null value data (ALWNULL). If on, the file record format(s) allow null value fields.
67 43 4 BIT(1) Qdbfvfld Variable length data (VARLEN). If on, the file record format(s) contain variable length fields.
67 43 5 BIT(1) Qdbftfld Date/time/timestamp data. If on, the file record format(s) contain date, time, or timestamp fields.
67 43 6 BIT(1) Qdbfgrph Graphic data. If on, the file record formats contain graphic fields.
67 43 7 BIT(1) Qdbfpkey Primary key (*PRIKEY). If on, the access path for the file is a primary key.
68 44 0 BIT(1) Qdbfunqc Unique constraint (*UNQCST). If on, the access path for the file is a unique constraint.
68 44 1 BIT(2) Reserved_118 Reserved.
68 44 3 BIT(1) Qdbfapsz Access path size (ACCPTHSIZ). If on (*MAX1TB), all access paths associated with this file will be allowed to occupy a maximum of 1 terabyte (1 099 511 627 776 bytes) of auxiliary storage. If off (*MAX4GB), all access paths associated with this file will be allowed to occupy a maximum of 4 gigabytes (4 294 966 272 bytes) of auxiliary storage.
68 44 4 BIT(1) Qdbfdisf Distributed file. If on, the file is a distributed file.
68 44 5 BIT(1) Reserved_68 Reserved.
68 44 6 BIT(1) Reserved_69 Reserved.
68 44 7 BIT(1) Reserved_70 Reserved.
69 45
CHAR(13) Qdbfhcrt File level identifier. The date of the file in internal standard format (ISF), CYYMMDDHHMMSS.
82 52
CHAR(52) Qdbfhtx File text description.
82 52
CHAR(2) Reserved_18 Reserved.
84 54
CHAR(50) Qdbfhtxt Text description (TEXT)
134 86
CHAR(13) Reserved_19 Reserved.
147 93
CHAR(30) Qdbfsrc Source file fields. Must be hexadecimal zeros if there is no source file information.
147 93
CHAR(10) Qdbfsrcf Source file name.
157 9D
CHAR(10) Qdbfsrcm Source file member name.
167 A7
CHAR(10) Qdbfsrcl Source file library name.
177 B1
CHAR(1) Qdbfkrcv Access path recovery (RECOVER).
A
The file access path is built after the IPL is completed (*AFTIPL).
N
The file access path is built when the file is next opened (*NO).
S
The file access path is built during the IPL (*IPL).
178 B2
CHAR(23) Reserved_20 Reserved.
201 C9
BINARY(2) Qdbftcid Coded character set identifier (CCSID) for text description.
0
There is no file text description.
1 through 65,535
The file text description CCSID.
203 CB
CHAR(2) Qdbfasp Auxiliary storage pool (ASP).
X'0000'
The file is located on the system auxiliary storage pool.
X'0002' through X'0010'
On which user auxiliary storage pool the file resides.
205 CD
CHAR(1) Qdbfnbit Complex objects flags.
205 CD 0 BIT(1) Qdbfhudt If on, the file record format has a user-defined type field.
205 CD 1 BIT(1) Qdbfhlob If on, the file record format has a large object field.
205 CD 2 BIT(1) Qdbfhdtl If on, the file record format has a datalink field. A datalink is a field data type that is used to point to another object that contains the data for that field.
205 CD 3 BIT(1) Qdbfhudf If on, the file uses a user-defined function.
205 CD 4 BIT(1) Qdbfhlon If on, the file has a datalink field with FILE LINK CONTROL.
205 CD 5 BIT(1) Qdbfhlop If on, the file is a logical file without any large object fields, but the based-on physical file has a large object field.
205 CD 6 BIT(1) Qdbfhdll If on, the file is a logical file without any datalink fields, but the based-on physical file has a datalink field.
205 CD 7 BIT(1) Qdbfsqlvol If on, the file is an SQL Volatile Table.
206 CE
BINARY(2) Qdbfmxfnum Maximum number of fields, 1 through 8000. Indicates the number of fields in the file's record format that contains the largest number of fields.
208 D0
CHAR(76) Reserved_22 Reserved.
284 11C
BINARY(4) Qdbfodic Offset from the start of the FDT header, Qdb_Qdbfh, to the IDDU/SQL Data Dictionary area, Qdbfdic.
288 120
CHAR(14) Reserved_23 Reserved.
302 12E
BINARY(2) Qdbffigl File generic key length, 0 through 2000. The length of the key before the first *NONE key field for the file. If this file has an arrival sequence access path, this field is not applicable.
304 130
BINARY(2) Qdbfmxrl Maximum record length, 1 through 32,766. The length of the record in the file's record format that contains the largest number of bytes.
306 132
CHAR(8) Reserved_24 Reserved.
314 13A
BINARY(2) Qdbfgkct File generic key field count, 0 through 120. The count of the number of key fields before the first *NONE key field for the file. If this file has an arrival sequence access path, this field is not applicable.
316 13C
BINARY(4) Qdbfos Offset from the start of the FDT header, Qdb_Qdbfh, to the file scope array, Qdbfb.
320 140
CHAR(8) Reserved_25 Reserved.
328 146
BINARY(4) Qdbfocs Offset from the start of the FDT header, Qdb_Qdbfh, to the alternative collating sequence table section, Qdb_Qdbfacs.
332 14C
CHAR(4) Reserved_26 Reserved.
336 150
CHAR(2) Qdbfpact Access path type.
AR
Arrival sequence access path.
KC
Keyed sequence access path with duplicate keys allowed. Duplicate keys are accessed in first-changed-first-out (FCFO) order.
KF
Keyed sequence access path with duplicate keys allowed. Duplicate keys are accessed in first-in-first-out (FIFO) order.
KL
Keyed sequence access path with duplicate keys allowed. Duplicate keys are accessed in last-in-first-out (LIFO) order.
KN
Keyed sequence access path with duplicate keys allowed. No order is guaranteed when accessing duplicate keys.
KU
Keyed sequence access path with no duplicate keys allowed (UNIQUE).
EV
Encoded vector with a 1-, 2-, or 4-byte vector.
338 152
CHAR(6) Qdbfhrls File version, release, and modification level. VxRyMz, where x is the version, y the release, and z the modification level.
344 158
CHAR(20) Reserved_27 Reserved.
364 16C
BINARY(4) Qdbpfof Offset from the start of the FDT header, Qdb_Qdbfh, to the physical file specific attributes section, Qdb_Qdbfphys.
368 170
BINARY(4) Qdblfof Offset from the start of the FDT header, Qdb_Qdbfh, to the logical file specific attributes section, Qdb_Qdbflogl.
372 174
CHAR(6) Qdbfssfp Sort sequence table.
372 174
CHAR(1) Qdbfnlsb Flags.
372 174 0 BIT(3) Qdbfsscs Sort sequence table (SRTSEQ) indicators.
B'000'
No sort sequence table for the file; however, an alternate collating sequence table was specified.
B'010'
No sort sequence table is used for the file, and the hexadecimal value of the characters will be used to determine the sort sequence (*HEX).
B'100'
A sort sequence table was specified for the file.
372 174 3 BIT(5) Reserved_103 Reserved.
373 175
CHAR(3) Qdbflang Language identifier (LANGID).
376 178
CHAR(2) Qdbfcnty Country or region identifier (CNTRYID).
378 17A
BINARY(4) Qdbfjorn Offset from the start of the FDT header, Qdb_Qdbfh, to the journal section, Qdb_Qdbfjoal.
382 17E
BINARY(4) Qdbfevid Initial number of distinct values an encoded vector access path was allowed at creation.
386 182
CHAR(14) Reserved_28 Reserved.


Physical File Specific Attributes (Qdb_Qdbfphys)

You can locate the Qdb_Qdbfphys section with the offset Qdbpfof, in the FDT header section.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(2) Qdbfpalc Allocate/contiguous storage (ALLOCATE and CONTIG)
DN
New members added to the file allow the system to determine storage space that is allocated for the member (ALLOCATE(*NO))
IC
New members added to file use the initial number of records to determine storage space that is allocated for the member (ALLOCATE(*YES)) and the storage attempted to be allocated contiguously (CONTIG(*YES)).
IN
New members added to file use the initial number of records to determine storage space that is allocated for the member (ALLOCATE(*YES)) and storage is not attempted to be allocated contiguously (CONTIG(*YES)).
2 2
CHAR(1) Qdbfcmps Maximum percentage of deleted records allowed (DLTPCT).
X'00'
The number of deleted records is not checked when the member is closed (*NONE).
X'01' through X'64'
The largest percentage of deleted records the member should have.
3 3
BINARY(4) Qdbfoff_sqpt For partitioned tables, offset from the start of the FDT header, Qdb_Qdbfh, to the Partitioned Table area, Qdb_Qdbfsqpt_Head.
7 7
CHAR(4) Reserved_29 Reserved.
11 B
BINARY(4) Qdbfprnum Initial number of records (SIZE).
0
The number of records that can be inserted into each member is not limited by the user. The system determines the maximum member size (*NOMAX)
1 through 2,147,483,646
The number of records that can be inserted before an automatic extension occurs.
15 F
BINARY(2) Qdbfpri Increment number of records (SIZE).
0 through 32,767
The maximum number of records that can inserted into the member after an automatic extension occurs.
17 11
BINARY(2) Qdbfprinum Maximum number of increments (SIZE).
0 through 32,767
The maximum number of increments that can be automatically added to the member.
19 13
BINARY(4) Qdbforid Offset from the start of FDT header, Qdb_Qdbfh (Qdb_Qdbfh), to the Record ID Codes for program described physical files, Qdbforid.
23 17
CHAR(1) Qflags Flags.
23 17 0 BIT(1) Qdbfrdel Reuse deleted records (RESUEDLT). If on, deleted member record space is reused by the system on write (insert) requests (*YES).
23 17 1 BIT(3) Reserved_30 Reserved.
23 17 4 BIT(1) Qdbfsqlt SQL table indicator. If on, the file is a SQL table.
23 17 5 BIT(1) Qdbfmqt SQL materialized query table indicator. If on, the file is a SQL materialized query table.
23 17 6 BIT(1) Qdbfsqpt Partitioned table indicator. If on, the file is a partitioned table.
23 17 7 BIT(1) Reserved_31 Reserved.
24 18
BINARY(4) Qdbfotrg Offset from the start of the FDT header, Qdb_Qdbfh, to the trigger description area, Qdbftrg.
28 1C
BINARY(2) Qdbftrgn Number of triggers.
30 1E   BINARY(4) Qdbfofcs Offset from the start of the FDT header, Qdb_Qdbfh, to the constraint definition area, Qdbf_Constraint.
34 22   BINARY(4) Qdbfcstn Number of constraints for the file.
38 26   BINARY(4) Qdbfodl Offset from the start of the FDT header, Qdb_Qdbfh, to the datalinks area, Qdb_Qdbfdtalnk.
42 2A   BINARY(4) Qdbfovw_mqt For SQL materialized query tables, offset from the start of the FDT header, Qdb_Qdbfh, to the SQL area, Qdb_Qdbfv.
46 2E   CHAR(2) Reserved_32 Reserved.


Trigger Description Area (Qdb_Qdbftrg)

You can locate the Qdb_Qdbftrg section with the offset Qdbfotrg in the Physical File Specific Attributes section,Start of Change or with the offset Qdbflotrg in the Logical File Specific Attributes section.End of Change This section is repeated by the number of triggers, Qdbftrgn Start of Changeor Qdbfltrgn.

Offset Bit Type Field Description
Dec Hex
0 0   CHAR(1) Qdbftrgt Trigger time.
1
Run the trigger after the change operation.
2
Run the trigger before the operation.
Start of Change3
Run the trigger instead of the operation.End of Change
1 1   CHAR(1) Qdbftrge Trigger event.
1
An insert operation.
2
A delete operation.
3
An update operation.
4
A read operation.
2 2   CHAR(10) Qdbftpgm Trigger program name.
12 C   CHAR(10) Qdbftplb Trigger program library name.
22 16   CHAR(1) Qdbftupd Trigger update condition.
1
Always call the trigger program when updating the file.
2
Call the trigger program only when the updated values are changed.
This field is ignored for insert and delete operations.
23 17   CHAR(1) Qdbftrgf Trigger flags.
23 17 0 BIT(1) Qdbfalrc Allow repeated change indicator. If on, repeated changes are allowed.
23 17 1 BIT(2) Qdbftths Trigger threadsafe indicator.
B'00'
Not known.
B'10'
Not threadsafe.
B'11'
Threadsafe.
23 17 3 BIT(2) Qdbftmta Multithreaded job action indicator.
B'01'
Run, send diagnostic.
B'10'
Do not run, send escape.
B'11'
Run, do not send message.
23 17 5 BIT(1) Qdbftqmt QMLTTHDACN system value use. If on, the system value was used to determine Qdbftmta.
23 17 6 BIT(1) Qdbf_more_trg_info Whether more trigger information is available if format FILD0400 is requested.
B'0'
No more trigger information is available.
B'1'
More trigger information is available.
23 17 7 BIT(1) Reserved_200 Reserved.


Constraint Definition Header (Qdb_Qdbf_Constraint)

You can locate the Qdb_Qdbf_Constraint section with the offset Qdbfofcs located in the physical file specific attributes section, Qdb_Qdbfphys.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbf_csto Offset from Qdbf_Constraint to the next section for this constraint.
4 4
BINARY(4) Qdbf_hlen Constraint entry header length in bytes.
8 8
CHAR(1) Qdbf_type Constraint type (TYPE)
F
Referential constraint
P
Primary unique constraint
U
Unique constraint.
C
Check constraint.
9 9
CHAR(1) Qdbf_chkpd Check pending attribute.
N
The constraint is not in check pending.
Y
The constraint is in check pending.
10 A
CHAR(1) Qdbf_state Constraint state.
D
The constraint is defined.
E
The constraint is established.
11 B
CHAR(1) Qdbf_abled Constraint enablement.
D
The constraint is disabled.
E
The constraint is enabled.
12 C
CHAR(13) Qdbf_add_ts Constraint date. The date is in the internal standard format (ISF), CYYMMDDHHMMSS.
25 19
CHAR(10) Qdbf_cst_lin Constraint library name.
35 23
BINARY(4) Qdbf_cst_lp2 Constraint name (delimited) length
39 27
CHAR(25) Reserved_54 Reserved.
64 40
CHAR(258) Qdbf_cst_name Constraint name (CST).


Constraint Definition Entries

The number of constraint definition entries depends on the type of constraint.


Constraint Keys (Qdb_Qdbf_Keyn)

The Qdb_Qdbf_Keyn section is located with the offset Qdbf_Hlen in the constraint definition header, Qdbf_Constraint. When the constraint is referential constraint, the offset to the next section is located with the offset Qdbf_Kslen in this structure.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbf_kslen Constraint key structure length. The length, in bytes, of this constraint key structure. This is also the offset to from Qdbf_Keyn to the next structure for this constraint.
4 4
BINARY(4) Qdbf_nokys Number of keys, 1 through 120. The number of key fields for the constraint key.
8 8
BINARY(4) Qdbf_klen Constraint key length.
12 C
CHAR(52) Revcst_7 Reserved.
64 40
Array of CHAR(32) Qdbf_narray Key name array.


Key Name Array (Qdb_Qdbf_Narray)

This array follows the constraint keys structure, Qdbf_Keyn. The number of constraint key name array entries is in field Qdbf_nokys in the constraint keys structure.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(10) Qdbf_kname Key name (PRNKEY KEY)
10 A
CHAR(22) Revcst_6 Reserved.


Referential Constraint Definition (Qdb_Qdbf_Riafk_Afkd)

You can locate this section with the offset Qdbf_kslen in the constraint keys structure, Qdbf_Keyn, that precedes this structure. This structure exists only if the constraint is a referential constraint.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(64)
Parent file (PRNFILE).
0 0
CHAR(10) Qdbf_riafk_pkfn Parent file name.
10 A
CHAR(10) Qdbf_riafk_pkln Parent file library name.
20 14
CHAR(44) Revcst_3 Reserved.
64 40
CHAR(1) Qdbf_riafk_fkcdr Delete rule (DLTRULE).
C
*CASCADE
D
*SETDFT
L
*SETNULL
N
*NOACTION (default value)
R
*RESTRICT
65 41
CHAR(1) Revcst_4 Reserved
66 42
CHAR(1) Qdbf_riafk_fkcur Update rule (UPDRULE)
N
*NOACTION (default value)
R
*RESTRICT
67 43
CHAR(61) Revcst_5 Reserved.


Check Constraint (Qdb_Qdbf_Chk_Cst)

This section is located with the offset Qdbf_Hlen in the constraint definition header, Qdbf_Constraint. This structure exists only if the constraint is a check constraint.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbf_chkcst_len Check constraint structure length. The length, in bytes, of the check constraint structure Qdb_Qdbf_Chk_Cst.
4 4
BINARY(4) Qdbf_chkexpr_len Check constraint expression length. The length of the check constraint expression Qdbf_chkexpr.
8 8
CHAR(24) Revcst_8 Reserved.
32 20
CHAR(*) Qdbf_chkexpr Check constraint expression.


Datalink Header (Qdb_Qdbfdtalnk)

The Qdb_Qdbfdtalnk section is the header for the datalink columns that have linked servers. There will be one header and one or more datalink column entries defined by the Qdb_Qdbfdlcole structure. You can locate this structure with the offset Qdbfodl in the Physical File Specific Attributes structure, Qdb_Qdbfphys.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfdlcoln Number of datalink columns with links to servers.
4 4
BINARY(4) Qdbfdlocole Offset from the start of Qdb_Qdbfdtalnk to the first datalink column entry, (Qdb_Qdbfdlcole).
8 8
CHAR(1) Qdbfdllnkp Link pending attribute. Link pending is a state that indicates to the user the file has one or more datalink field values (under the file link control attribute) where the system does not know whether or not the field is really linked to a file on the DataLink File Manager server. The Datalink File Manager is a function that tracks which files are linked to a specific database file.
N
The file is not in link pending.
Y
The file is in link pending.
9 9
CHAR(23) Revdl_1 Reserved.


Datalink Column Entry (Qdb_Qdbfdlcole)

The Qdb_Qdbfdlcole section repeats for the number of columns (Qdbfdlcoln) defined in structure Qdb_Qdbfdtalnk. You can locate the first column entry using offset Qdbfdlocole in structure Qdb_Qdbfdtalnk. Since Qdb_Qdbfdlcole is a varying length structure, use length Qdbfdlcelen to get to the next column entry.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfdlcelen Length of this datalink column entry. Use this length to get to the next datalink column entry.
4 4
BINARY(4) Qdbfdlsevn Number of servers linked for this column.
8 8
CHAR(10) Qdbfdlcolnm Column name.
18 12
CHAR(14) Revdl_2 Reserved.
32 20
Array of CHAR(254) Qdbfdlsevnm Array of server names linked to the datalink column. The number of array entries is defined by Qdbfdlsevn.


Record ID Codes (Qdb_Qdbfdrtb)

The Qdb_Qdbfdrtb section describes the record ID codes for program described physical files. The record ID code information is an array with variable length entries. You can locate this section with the offset Qdbforid located in the physical file specific attributes section, Qdb_Qdbfphys.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(16)
Record ID code header.
0 0
BINARY(2) Qdbfdrnum Number of record ID code array entries, 0 through 70.
2 2
BINARY(4) Qdbfdrtl Size of this record ID code table in bytes, 0 through 256.
6 6
CHAR(10) Reserved_33 Reserved.
16 10
Array of CHAR(32) Qdbfdrae Record ID code array entry.


Record ID Codes Array (Qdb_Qdbfdrae)

This array follows the record ID codes structure, (Qdb_Qdbfdrtb). The number of record ID code array entries is in Qdbfdrnum.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(4) Reserved_34 Reserved.
4 4
CHAR(10) Qdbfdrnm External name.
14 E
BINARY(2) Qdbfdrrp Relative field position, 1 through 8000. The relative position of the field in the record format.
16 10
CHAR(2) Qdbfdrco Comparison operator.
EQ
Compare equal.
NE
Compare not equal.
ZN
Compare zone.
NZ
Compare not zone.
DG
Compare digit.
ND
Compare not digit.
18 12
BINARY(2) Qdbfdrln Length of test value. Test value length must be 1.
20 14
CHAR(1) Qdbfdrtv Test value.
21 15
CHAR(1) Qdbfdrao AND/OR/last operator.
0
Last operator entry.
1
AND with next array entry.
2
OR with next array entry.
22 16
CHAR(10) Reserved_35 Reserved.


Logical File Specific Attributes (Qdb_Qdbflogl)

You can locate the Qdb_Qdbflogl section with the offset Qdbflfof located in the FDT header section, Qdb_Qdbfh.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfoj Offset from the start of the FDT header, Qdb_Qdbfh, to the join specifications, Qdbfj.
4 4
BINARY(2) Qdbfscsn Total number of select/omit statements for all record formats, 1 through 32,767.
6 6
CHAR(10) Qdbflxp Record format selector program (FMTSLR)
X'00'
No record format selector program (*NONE).
16 10
CHAR(10) Qdbflxl Record format selector program library (FMTSLR)
X'00'
No record format selector program (*NONE).
26 1A
BINARY(4) Qdbfovw Offset from the start of the FDT header, Qdb_Qdbfh, to the SQL area, Qdb_Qdbfv.
30 1E
CHAR(1) Qlfa Logical file attributes
30 1E 0 BIT(2) Reserved_36 Reserved.
30 1E 2 BIT(1) Qdbfjoin Join logical file indicator (JFILE). If on, the file is a join logical file.
30 1E 3 BIT(1) Qdbfdyns Dynamic selection indicator (DYNSLT). If on, the selection and omission tests specified for the file are done when the file is read. If off, when the access path is updated.
30 1E 4 BIT(1) Qdbfsqlv SQL view indicator. If on, the file is an SQL view.
30 1E 5 BIT(1) Qdbfsqli SQL index indicator. If on, the file is an SQL index.
30 1E 6 BIT(2) Reserved_37 Reserved.
31 1F
CHAR(1) Qdbfjtyp Join file type.
I
An inner join. Default entries are not supplied if a join value does not exist.
P
A partial outer join. Default values are supplied if a join value does not exist.
32 20
BINARY(2) Qdbfsrcd Coded character set identifier (CCSID) for select/omit constants.
0
There are no select/omit constants for the file.
1 through 65,535
The CCSID.
34 22
CHAR(1) Qdbfwchk With check option.
C
The with-check option was specified with cascade.
L
The with-check option was specified with local.
N
No with-check option was specified.

The value N is set for all logical files. The values C and L only apply to SQL views.

Start of Change35 23
BINARY(4) Qdbflotrg Offset from the start of the FDT header, Qdb_Qdbfh, to the trigger description area, Qdbftrg.
Start of Change39 27
BINARY(2) Qdbfltrgn Number of triggers.
41 29
CHAR(7)End of Change Reserved_38 Reserved.


Join Specifications (Qdb_Qdbfj)

The join specifications, Qdb_Qdbfj, are a linked list. There is an entry in the linked list for each join to-file. Each entry defines the join logical file's based on physical files and the fields in the from-file and the to-file used to join the based on physical file.

You can locate this section with the offset Qdbfoj located in the FDT header section, Qdb_Qdbfh.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfjnho Offset from the start of the FDT header, Qdb_Qdbfh, to the join specifications, Qdbfj, for the next join to-file.
4 4
CHAR(4) Reserved_40 Reserved.
8 8
BINARY(2) Qdbfjknum Number of join field specifications (JFLD), 1 through 32,767.
10 A
BINARY(2) Qdbfjdnum Number of join duplicate sequence specifications (JDUPSEQ), 1 through 32,767.
12 C
BINARY(2) Qdbfjffnum Join from-file number (JOIN), 1 through 255. This number indicates which based on physical file to join the to-file from.
14 E
BINARY(2) Qdbfjtfnum Join to-file number (JOIN), 2 through 256. This number indicates which based on physical to-file this join specification relates to.
16 10
CHAR(24) Reserved_41 Reserved.
40 28
BINARY(4) Qdbfjsao Offset from the start of the FDT header, Qdb_Qdbfh, to the join specification array, Qdb_Qdbfjfld
44 2C
BINARY(4) Qdbfjdao Offset from the start of the FDT header, Qdb_Qdbfh, to the join duplicate sequence array, Qdb_Qdbfjdup, for this join to-file.


Join Specification Array (Qdb_Qdbfjfld)

You can locate the Qdb_Qdbfjfld section with the offset Qdbfjsao located in the join header section, Qdb_Qdbfj. The number of join specification array entries may be up to one less than the number of data members, Qdbflbnum , located in the FDT header section, Qdb_Qdbfh.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(10) Qdbfjfnm Join from-field-name (JFLD)
10 A
BINARY(2) Qdbfjfnum Join from-field reference number.
0
Join from-field is a field in the join logical file's record format.
1 through 255
The number of the base on physical from-file corresponding with its position in the JFILE statement that contains this join from-field.
12 C
CHAR(2) Reserved_42 Reserved.
14 E
CHAR(2) Qdbfjop Join operation. This is always set to 'EQ'.
16 10
CHAR(10) Qdbfjtnm Join to-field name (JFLD).
26 1A
BINARY(2) Qdbfjtnum Join to-field reference number.
0
The join to-field is a field in the logical file's record format.
2 through 256
The number of the based on physical to-file corresponding with its position in the JFILE statement that contains this join to-field.
28 1C
CHAR(20) Reserved_43 Reserved.


Join Duplicate Sequence Specification Array (Qdb_Qdbfjdup)

You can locate the Qdb_Qdbfjdup section with the offset Qdbfjdao in the join section, Qdb_Qdbfj. The number of join specification array entries may be up to one less than the number of data members, Qdbflbnum, located in the FDT header section, Qdb_Qdbfh.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(10) Qdbfjdnm Join specification field name (JDUPSEQ).
10 A
BINARY(2) Qdbfjdjnum Join sequence field name reference number.
0
The join sequencing field name is a file in the join logical file's record format.
2 through 256
The number of the based on physical to-file corresponding with its position in the JFILE statement that contains this sequencing field name.
12 C
CHAR(1) Qjsfna Join sequencing field name attributes.
12 C 0 BIT(1) Qdbfjdd Ascending/descending sequence indicator. If on, indicates a descending field (*DESCEND).
12 C 1 BIT(7) Reserved_44 Reserved.
13 D
CHAR(19) Reserved_45 Reserved.


SQL Area (Qdb_Qdbfv)

The SQL area, Qdb_Qdbfv, contains the SQL select statement. For logical files, you can locate this section with the offset Qdbfovw located in the logical file specific attributes section, (Qdb_Qdbflogl). For SQL materialized query tables, you can locate this section with the offset Qdbfovw_mqt located in the physical file specific attributes section, (Qdb_Qdbfphys).

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(56)
SQL area header.
0 0
CHAR(16) Reserved_39 Reserved.
16 10   BINARY(4) Qdbfvs_start Starting offset of the SELECT statement within the CREATE TABLE statement.
20 14   BINARY(4) Qdbfvs_end Ending offset of the SELECT statement within the CREATE TABLE statement.
24 18   BINARY(2) Qdbfvs_ccsid Coded Character Set Identifier, CCSID, for the Select Statement. Views created prior to V5R1M0 will return a CCSID value of 0.
26 1A   BINARY(4) Qdbfmqtd_o For SQL materialized query tables, offset from the start of the FDT header, Qdb_Qdbfh, to the SQL materialized query table dependency area, Qdb_Qdbfmqtd_Head.
30 1E
CHAR(2) Qdbfmqt_cmt The isolation level in effect for the SQL materialized query table:
NC
*NONE no isolation
UR
*CHG uncommitted read.
CS
*CS cursor stability
CL
*CS with keep locks
RS
*ALL read stability
RR
*RR repeatable read
32 20
CHAR(1) Qdbfvflgs Flags.
32 20 0 BIT(1) Qdbfmqt_init SQL materialized query table initial data. If on, data is inserted into the table immediately as part of the SQL Create Table statement. If off, data is deferred until the SQL Refresh Table statement is issued for the table.
32 20 1 BIT(1) Qdbfmqt_ maint SQL materialized query table maintenance. If on, table is user-maintained.
32 20 2 BIT(1) Qdbfmqt_ refresh SQL materialized query table refresh. If off, table is refresh-deferred.
32 20 3 BIT(1) Qdbfmqt_opt SQL materialized query table optimization. If on, table is disabled for optimization. If off, table is enabled for optimization.
32 20 4 BIT(4) Reserved_88 Reserved.
33 21
CHAR(23) Reserved_89 Reserved.
56 38


SQL select statement structure
56 38
BINARY(4) Qdbfvssl Select statement length.
60 3C
CHAR(*) Qdbfvsst SQL select statement.


SQL Materialized Query Table Dependency Header (Qdb_Qdbfmqtd_Head)

The Qdb_Qdbfmqtd_Head section is located with the offset Qdbfmqtd_o in the SQL area, Qdb_Qdbfv. This structure exists only if the file is a SQL materialized query table.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfmqtd_ len_sum Total length, in bytes, of the dependency area. This includes both the dependency header and the dependency array.
4 4
BINARY(4) Qdbfmqtd_ #_deps Number of file entries in the dependency array.
8 8
CHAR(56) Reserved_16 Reserved.
64 40
CHAR(*) Dependency array, Qdb_Qdbfmqtd, for this SQL materialized query table.


SQL Materialized Query Table Dependency Entry (Qdb_Qdbfmqtd)

The Qdb_Qdbfmqtd section repeats in the dependency array for the number of depended-on files (Qdbfmqtd_#_deps) defined in structure Qdb_Qdbfmqtd_Head. The first dependency entry follows the dependency header Qdb_Qdbfmqtd_Head. Use length Qdbfmqtd_len to get to the next dependency entry.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(16) Reserved_117 Reserved.
16 10
BINARY(4) Qdbfmqtd_len Length, in bytes, of this dependency entry. Use this length to get to the next dependency entry.
20 14
CHAR(10) Qdbfmqtd_file Name of the file that the materialized query table is dependent on. The file is specified in the select-statement of the materialized query table.
30 1E
CHAR(10) Qdbfmqtd_lib Name of the library that the depended-on file resides in.
40 28
CHAR(56) Reserved_116 Reserved.


Partitioned Table Header (Qdb_Qdbfsqpt_Head)

The Qdb_Qdbfsqpt_Head section is located with the offset Qdbfoff_sqpt. This structure exists only if the file is a partitioned table.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfsqpt_Len_ Sum Total length, in bytes, of the header area. This includes all the partition areas and partition key areas.
4 4
CHAR(4) Qdbfsqpt_Sql_ Reserved4 Reserved.
8 8
CHAR(1) Qdbfsqpt_Ran_ Hh Partitioning is range or hash.
R
Range Partitioning
H
Hash Partitioning
9 9
CHAR(1) Qdbfsqpt_ Lfld Field has long field name.
Y
Field has a long name.
N
Field does not have a long name.
10 0A
CHAR(230) Qdbfsqpt_ Reserved230 Reserved.
240 F0
BINARY(4) Qdbfsqpt_Num_ Parts Number of file partitions.
244 F4
BINARY(4) Qdbfsqpt_Part_ Offset The offset to the first partition. This is from the start of the Partitioned Table Header, Qdb_Qdbfsqpt_Head, to the first partition, Qdb_Qdbfsqpt_Part.
248 F8
BINARY(4) Qdbfsqpt_Hk_ Offset The offset to the hash key area. This offset is only set if hash partitioning is being done for the partitioned table. This is from the start of the Partitioned Table Header, Qdb_Qdbfsqpt_Head, to the partition hash header Qdb_Qdbfsqpt_Head_Hash, if hash partitioning is being done.
252 FC
CHAR(100) Qdbfsqpt_ Reserved_100 Reserved.
352 160
CHAR(*)   Partitioned area, Qdb_Qdbfsqpt_Part, for this partitioned table and partition hash key area Qdb_Qdbfsqpt_Head_Hash, if hash partitioning is being done.

Partitioned Area (Qdb_Qdbfsqpt_Part)

The Qdb_Qdbfsqpt_Part section is located with the offset Qdbfsqpt_Part_Offset. This structure exists only if the file is a partitioned table.The repeating structure(Qdb_Qdbfsqpt_Part) can be located with the Qdb_Qdbfsqpt_Part_Len value.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfsqpt_Part_ Len Total length, in bytes, of this partition area. This includes all other partition key areas. Use this length to get to the next partition area.
4 4
BINARY(4) Qdbfsqpt_Part_ DSN Partition data space number.
8 8
BINARY(4) Qdbfsqpt_Part_ Num Partition number.
12 0C
BINARY(4) Qdbfsqpt_Pname_L en The length of the partition name.
16 10
CHAR(128) Qdbfsqpt_ Pname The partition name.
144 90
CHAR(80) Qdbfsqpt_Mbr_ Reserved80 Reserved.
224 E0
BINARY(4) Qdbfsqpt_Num_ Keys The number of partition range keys.
228 E4
BINARY(4) Qdbfsqpt_Range_ Offset The offset to the first partition range key area for this partition. If hash partitioning is being done, this value will not be set. This is from the start of the Partitioned Area, Qdb_Qdbfsqpt_Part, to the Qdb_Qdbfsqpt_Range.
232 E8
CHAR(8) Qdbfsqpt_ Reserved_8 Reserved.
240 F0
CHAR(*)   Partition range key area Qdb_Qdbfsqpt_Range, for this partitioned table. This entry repeats for the number of partition range keys.

Partition Range Key Area (Qdb_Qdbfsqpt_Range)

The Qdb_Qdbfsqpt_Range section is located with the offset Qdbfsqpt_Ran_Offset. This structure exists only if the file is a partitioned table that has range partitioning. Use Qdbfsqpt_Range_Len to get to the next entry.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfsqpt_Range_ Len Total length, in bytes, of this partition range key area.
4 4
CHAR(12) Qdbfsqpt_ Reserved12 Reserved.
16 10
CHAR(10) Qdbfsqpt_Range_ Key Partition range key name.
26 1A
BINARY(2) Qdbfsqpt_Range_ Reserved Reserved.
28 1C
CHAR(1) Qdbfsqpt_ Rmin Partition range key start value minimum.
Y
Yes
N
No
29 1D
CHAR(1) Qdbfsqpt_ Rmax Partition range key end value maximum.
Y
Yes
N
No
30 1E
CHAR(1) Qdbfsqpt_ Rsin Partition range key start value inclusive.
Y
Yes
N
No
31 1F
CHAR(1) Qdbfsqpt_ Rein Partition range key end value inclusive.
Y
Yes
N
No
32 20
CHAR(15) Qdbfsqpt_ reserved15 Reserved.
47 2F
CHAR(1) Qdbfsqpt_ Rnull Partition range key value can include nulls.
Y
Yes
N
No
48 30
BINARY(4) Qdbfsqpt_ Rslen Length in bytes of the starting partition range key value string.
52 34
BINARY(4) Qdbfsqpt_ Relen Length in bytes of the ending partition range key value string.
56 38
BINARY(4) Qdbfsqpt_Rstart_ Offset The offset to the starting partition range key value string. This is from the start of Qdb_Qdbfsqpt_Range.
60 3C
BINARY(4) Qdbfsqpt_Rend_ Offset The offset to the ending partition range key value string. This is from the start of Qdb_Qdbfsqpt_Range.
64 40
CHAR(14) Qdbfsqpt_ Reserved14 Reserved.
78 4E
BINARY(2) Qdbfsqpt_ Rccsid Coded character set identifier (CCSID) for the start and end strings.
80 50
CHAR(*)   Start value string and end value string for this partition range key.

Partition Header Hash Key Area (Qdb_Qdbfsqpt_Head_Hash)

The Qdb_Qdbfsqpt_Head_Hash is the header area for the hash keys. It is located with the offset Qdbfsqpt_Hk_Offset. This structure exists only if the file is a partitioned table that has hash partitioning.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfsqpt_Head _Hash_Len Length, in bytes, of the partition header hash key area.This includes the total length of all hash key entries.
4 4
BINARY(4) Qdbfsqpt_Head _Num_Keys Total number of hash keys.
8 8
CHAR(56) Head_ Reserved_56 Reserved.
64 40
Array of CHAR(32) Qdbfsqpt_ hash Key name array.



Partition Hash Key Area (Qdb_Qdbfsqpt_Hash)

The Qdb_Qdbfsqpt_Hash section repeats for the number of partition hash keys,Qdbfsqpt_Head_Num_Keys. It follows Qdb_Qdbfsqpt_Head_Hash.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(10) Qdbfsqpt_ Hash_Key Partition hash key name.
10 0A
CHAR(22) Hash_ Reserved_22 Reserved.


Alternative Collating Sequence Table (Qdb_Qdbfacs)

You can locate this section with the offset Qdbfocs in the FDT header section, Qdb_Qdbfh. This section is also referred to as the Sort Sequence Table. A sort sequence table can be either single-byte or UCS-2. If the UCS-2 table length, Qdbf_UCS2_Srtseq_Len, is non-zero, then it is a UCS-2 sort sequence table and the single-byte table, Qdbfacst, will be cleared.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(256) Qdbfacst Alternative collating sequence table or single-byte sort sequence (ALTSEQ/STRSEQ) table.
256 100
BINARY(2) Qdbfccsd Coded character set identifier (CCSID) for the single-byte table.
258 102
CHAR(20) qdbfsrts Sort sequence table.
258 102
CHAR(10) Qdbftbln Sort sequence table name.
268 10C
CHAR(10) Qdbftbll Sort sequence table library name.
278 116
CHAR(1) Qdbfsrtf Sort sequence table attributes.
278 116 0 BIT(1) Qdbfwght Sort sequence table weight indicator for the single-byte table. If on, indicates the sort sequence table is unique weighted. If off, it is share weighted.
278 116 1 BIT(1) Qdbfsubc Sort sequence table substitution character indicator for the single-byte table. If on, indicates the sort sequence table has substitution character.
278 116 2 BIT(1) Qdbf_UCS2_ Wght Sort sequence table weight indicator for the UCS-2 table. If on, indicates the sort sequence table is unique weighted. If off, it is share weighted.
278 116 3 BIT(5) Reserved_104 Reserved.
279 117
BINARY(4)
Qdbf_UCS2
_Srtseq_Len

Length of the UCS-2 sort sequence table, Qdbf_UCS2_Srtseq, in bytes.
283 11B
BINARY(2) Qdbf_UCS2_ Ccsd Coded character set identifier (CCSID) for the UCS-2 table.
285 11D
CHAR(19) Reserved_101 Reserved.
304 130
CHAR(*)
Qdbf_UCS2
_Srtseq

UCS-2 sort sequence table. The table exists if the length, Qdbf_UCS2_Srtseq_Len, is greater than zero.


IDDU/SQL Data Dictionary Area (Qdb_Qdbfdic)

You can locate the Qdb_Qdbfdic section with offset Qdbfodic in the FDT header section, Qdb_Qdbfh.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(1) Qdbfdilk Data dictionary link status.
L
The file is linked to the a data dictionary.
U
The file is not linked to the a data dictionary.
1 1
CHAR(10) Qdbfinm Data dictionary library name.
11 B
CHAR(10) Qdbfifd Data dictionary file definition name.
21 15
CHAR(11) Qdbfdiid Data dictionary internal file definition identifier. This field maps to ZONED(11,0).
32 20
CHAR(4) Reserved_46 Reserved.
36 24
BINARY(4) Qdbfdicl Data dictionary file definition comment length.
40 28
BINARY(2) Qdbfdicc Data dictionary file definition comment CCSID.
0
There is no comment for the file.
1 through 65,535
The CCSID of the comment.
42 2A
BINARY(4) Qdbfolng Offset from the start of the FDT header, Qdb_Qdbfh, to the SQL long/alias file names area, Qdb_Qdbflngn.
46 2E
BINARY(2) Qdbflnnum Number of long/alias file names for the file.
48 30
CHAR(16) Reserved_47 Reserved.
64 40
CHAR(*) Qdbfdict Data dictionary file definition comment text.


SQL Long/Alias File Name Area (Qdb_Qdbflngn)

The SQL long/alias file name area contains the files alternate names that can be used to access the file when using the system's SQL interfaces. You can locate the Qdb_Qdbflngn section with the offset Qdbfolng in the IDDU/SQL data dictionary section.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(2) Qdbflnel Long/alias file name entry length in bytes. The length of this entry. This is also the offset from Qdbflnen to the next long/alias entry.
2 2
CHAR(1) Qdbflnfl Long/alias file name flags.
2 2 0 BIT(1) Qdbflndl Long/alias file name input delimited indicator. If on, indicates the long/alias file name was delimited when input.
2 2 1 BIT(7) Reserved_111 Reserved
3 3
BINARY(2) Qdbflnlg Long/alias file name (non-delimited) length.
5 5
CHAR(11) Reserved_112 Reserved.
16 10
CHAR(*) Qdbflnam Long/alias file name (non-delimited).


File Scope Array (Qdb_Qdbfb)

A file scope array, Qdb_Qdbfb, is present for all database files. The number of data members, Qdbflbnum, contains the number of file scope array entries. Each entry contains a based on physical file name and, optionally, a record format name.

Externally described physical files have one entry that names the physical file record format. The entry's file name portion is not used.

Program described physical files have one entry for each data dictionary record format. The entry names the data dictionary record format. The entry's file name portion is not used.

Non-join logical files have one entry for each based on physical file. The entry names the based on physical file and describes the logical file record format to use with that file.

Join logical files have one entry for each based on physical file. The entry names the based on physical file. Only the first entry describes the logical file record format.

SQL view logical files have one entry for each based on physical file. The entry names the based on physical file that will be either an externally described physical file or another view logical file. Only the first entry describes the logical file record format.

You can locate this section with the offset Qdbfos in the FDT header section, Qdb_Qdbfh.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(48) Reserved_48 Reserved.
48 30
CHAR(10) Qdbfbf Based on physical file name.
58 3A
CHAR(10) Qdbfbfl Based on physical file library name.
68 44
CHAR(10) Qdbft Record format name.
78 4E
CHAR(37) Reserved_49 Reserved.
115 73
BINARY(2) Qdbfbgky Record format generic key field count, 0 through 120. If this file has an arrival sequence access path, this field is not applicable.
117 75
CHAR(2) Reserved_50 Reserved.
119 77
BINARY(2) Qdbfblky Record format maximum key length, 1 through 2000. If this file has an arrival sequence access path, this field is not applicable.
121 79
CHAR(2) Reserved_51 Reserved.
123 7B
BINARY(2) Qdbffogl Record format generic key length, 1 through 2000. If this file has an arrival sequence access path, this field is not applicable.
125 7D
CHAR(3) Reserved_52 Reserved.
128 80
BINARY(2) Qdbfsoon Number of select/omit statements, 1 through 32,767.
130 82
BINARY(4) Qdbfsoof Offset from the start of the FDT header, Qdb_Qdbfh, to the select/omit specification array, Qdb_Qdbfss.
134 86
BINARY(4) Qdbfksof Offset from the start of the FDT header, Qdb_Qdbfh, to the key specification array, Qdb_Qdbfk.
138 8A
BINARY(2) Qdbfkyct Record format full key field count, 0 through 120. If this file has an arrival sequence access path, this field is not applicable.
140 8C
BINARY(2) Qdbfgenf Generic key field count for all record formats with this record format name, 0 through 120. If this file has an arrival sequence access path, this field is not applicable.
142 8E
BINARY(4) Qdbfodis Offset from the start of the FDT header, Qdb_Qdbfh to the distributed file definition section.
146 92
CHAR(14) Reserved_53 Reserved.


Select/Omit Specification Array (Qdb_Qdbfss)

The select/omit specification array ( Qdb_Qdbfss) entries describe the record format fields to which the select/omit statement refer.

Non-join logical files can have one select/omit specification array for each file scope array entry.

Join logical files can have only one select/omit specification array. The first scope array entry for the join logical file contains the offset to the select/omit specification array.

You can locate this section with the offset Qdbfsoof in the scope array entry section.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(2) Reserved_54 Reserved.
2 2
CHAR(1) Qdbfssso Select/omit statement rule.
A
A select/omit ANDed statement.
O
A select/omit omit statement.
S
A select/omit select statement.
3 3
CHAR(2) Qdbfssop Select/omit statement comparison (ALL COMP VALUES)
AL
Statement comparison for all (ALL).
EQ
Statement comparison for equal to (COMP EQ).
GE
Statement comparison for greater than or equal to (COMP GE).
GT
Statement comparison for greater than (COMP GT).
LE
Statement comparison for less or equal to (COMP LE).
LT
Statement comparison for less than (COMP LT).
NE
Statement comparison for not equal to (COMP NE).
NG
Statement comparison for not greater than (COMP NG).
NL
Statement comparison for not less than (COMP NL).
VA
Statement comparison for values (VALUES).
5 5
CHAR(10) Qdbfssfn Select/omit statement field name.
15 F
BINARY(2) Qdbfsspnum Number of select/omit statement parameters, 1 through 32,767.
17 11
CHAR(1) Qsosaf Select/omit statement attribute flags.
17 11 0 BIT(7) Reserved_55 Reserved.
17 11 7 BIT(1) Qdbfssfi Select/omit statement external or internal name indicator. If on, indicates the statement is field name is an external record format name.
18 12
BINARY(2) Qdbfssfj Select/omit statement join reference number (JREF), 1 through 256. If this is not a join logical file, this field is not applicable.
20 14
CHAR(8) Reserved_56 Reserved.
28 1C
BINARY(4) Qdbfsoso Offset from the start of the FDT header, Qdb_Qdbfh, to the select/omit parameters, Qdb_Qdbfsp, for this select/omit statement.


Select/Omit Parameters (Qdb_Qdbfsp)

The Qdb_Qdbfsp section is a linked list of parameter descriptions. It describes the parameter values for this particular select/omit statement. The parameters are either a compare value or another record format field.

You can locate this section with the offset Qdbfsoso in the select/omit array section, Qdb_Qdbfss.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qdbfspno Offset from the start of the FDT header, Qdb_Qdbfh, to the next select/omit parameter for this select/omit statement.
4 4
BINARY(2) Qdbfspln Select/omit parameter length, 1 through 32,767.
6 6
CHAR(1) Qdbfspin Select/omit parameter attribute indicator.
X'00'
The parameter is a compare value.
X'01'
The parameter is a internal record format field.
X'02'
The parameter is an external record format field.
7 7
CHAR(1) Qasopaf Select/omit attribute flags.
7 7 0 BIT(1) Qdbfsigc Double-byte character set (DBCS) and/or graphic data indicator. If on, indicates the non-field compare value contains DBCS or graphic data.
7 7 1 BIT(1) Qdbfshex Hexadecimal data indicator. If on, indicates the non-field compare value is hexadecimal data.
7 7 2 BIT(1) Qdbfsnul Null value indicator. If on, indicates the non-field compare value is the null value.
7 7 3 BIT(5) Reserved_57 Reserved.
8 8
BINARY(2) Qdbfsppj Select/omit parameter join reference number (JREF), 1 through 256. This field is not applicable if this file is not a join logical file or the compare value is a non-field value.
10 A
CHAR(10) Reserved_58 Reserved.
20 14
CHAR(*) Qdbfspvl Select/omit parameter compare value or the record format field name. This is the compare value when Qdbfspin contains X'00'. This is the record format field name when Qdbfspin contains X'01' or X'02'.


Key Specification Array (Qdb_Qdbfk)

The key specification array (Qdb_Qdbfk) entries describe the record format fields used in defining the file access path.

Non-join logical files can have one key specification array for each file scope array entry.

Join logical files can have only one key specification array. The first scope array entry for the join logical file contains the offset to the file's key specification array.

You can locate this section with the offset (Qdbfksof) in the scope array entry section, Qdb_Qdbfb.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(10) Qdbfkfld Key statement field name. X'40's indicate the key statement is a *NONE key field.
10 A
CHAR(3) Reserved_59 Reserved.
13 D
CHAR(1) Qdbfksq Key statement sequencing attribute flags.
13 D 0 BIT(1) Qdbfksad Ascending/descending sequence indicator. If on, indicates the descending sequence (*DESCEND).
13 D 1 BIT(2) Qdbfksn Numeric key field sequencing indicators.
B'00'
The numeric key field sequences as a string of unsigned binary data (UNSIGNED).
B'01'
The numeric key field ignores the sign of the field and sequences as absolute value data (ABSVAL).
B'10'
The numeric key field considers the sign of the field and sequences as signed value data (SIGNED).
13 D 3 BIT(1) Reserved_60 Reserved.
13 D 4 BIT(1) Qdbfksac Alternate collating sequence indicator (ALTSEQ). If on, indicates the alternate collating sequence table applies to this key field.
13 D 5 BIT(1) Qdbfkszf Force zone sequencing indicator. If on, indicates the zone portion of the key field is zeroed so only the digit portion (furthest right four bits) is used in key sequencing (DIGIT). If off, the zone portion is not zeroed.
13 D 6 BIT(1) Qdbfksdf Force digit sequencing indicator. If on, indicates the digit portion of the key field is zeroed so only the zone portion (furthest left four bits) is used in key sequencing (ZONE). If off, the digit portion is not zeroed.
13 D 7 BIT(1) Qdbfkft Key statement external or internal name indicator. If on, indicates the field name is the external record format name.
14 E
CHAR(18) Reserved_61 Reserved.


Distributed File Definition Section and Partition Key Array (Qdb_Qdbf_dis_pkeyarr)

The distributed file definition section and partition key array (Qdb_Qdbf_dis_pkeyarr) contains the node group name and library name for the distributed file and the record format fields used in defining the partition key for each scope entry.

You can locate this section with the offset Qdbfodis in the scope array entry section, Qdb_Qdbfb.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(10) Qdbf_dis_ ndgpn Distributed file node group name.
10 A
CHAR(10) Qdbf_dis_ ndgpl Distributed file node group library name.
20 14
BINARY(4) Qdbf_dis_ nkyn Number of partition key fields for this scope entry.
24 18
CHAR(40) Reserved_ 121 Reserved.
64 40
ARRAY of CHAR(32) Qdbf_dis_ pkeyarr Distributed file partition key array.
64 40
CHAR(10) Qdbf_dis_ kname Partition key field name.
74 4A
CHAR(22) Reserved_ 122 Reserved.


Journal Information (Qdb_Qdbfjoal)

The section Qdb_Qdbfjoal contains the journal information for the physical file. You can locate this section with offset Qdbfjorn in the FDT header section, Qdb_Qdbfh.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(10) Qdbfojrn Journal name.
10 A
CHAR(10) Qdbfolib Journal library name.
20 14
CHAR(1) Qdbfojpt Journaling options.
20 14 0 BIT(1) Reserved_106 Reserved.
20 14 1 BIT(1) Qdbfjbim Before image indicator. If on, indicates the before images are being journaled.
20 14 2 BIT(1) Qdbfjaim After image indicator. If on, indicates the after images are being journaled.
20 14 3 BIT(1) Reserved_107 Reserved.
20 14 4 BIT(1) Qdbfjomt Omit journal entries indicator. If on, indicates the open and close entries are being omitted from the journal.
20 14 5 BIT(3) Reserved_108 Reserved.
21 15
CHAR(1) Qdbfjact Journaling options.
0
The file is not being journaled.
1
The file is being journaled.
22 17
CHAR(13) Qdbfljrn Last journaling date stamp. This is the date that corresponds to the most recent time that journaling was started. The date is in internal standard format (ISF), CYYMMDDHHMMSS.
35 23
CHAR(29) Reserved_105 Reserved.


FILD0200 Format (Qdb_Qddfmt Structure)

FILD0200 provides the format used by the records of the specified file. This structure is also used by the QQQQRY API to get data from the named file. FILD0200 Format shows how this information is organized. When more than one entry can appear, the figure indicates this as in (6). Descriptions and offsets of the fields in this structure are in the tables immediately following FILD0200 Format.

The descriptions and offsets are available in the include source supplied on the system. You can see this source in source file H, member name QDBRTVFD, in the QSYSINC library.

FILD0200 Format

FILD0200 Format.



Format Definition Header (Qdb_Qddfmt)

The Qdb_Qddfmt section is always located at the beginning of the returned data area.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qddbyrtn Bytes returned. The total length, in bytes, of the data returned.
4 4
BINARY(4) Qddbyava Bytes available. The total length, in bytes, of the format.
8 8
CHAR(24) Reserved_62 Reserved.
32 20 0 CHAR(1) Qddfmtf Record format DBCS flags.
32 20 0 BIT(1) Qddfrity Double byte character set and/or graphic data. If on, indicates the format contains DBCS or graphic data.
32 20 1 BIT(1) Qddfrilt Double byte character set and/or graphic literals. If on, indicates the format contains DBCS or graphic literals.
32 20 2 BIT(1) Qddfritx Double byte character set record format text description. If on, indicates the text description contains DBCS data.
32 20 3 BIT(1) Qddfrmep Mapping error possible. If on, indicates the format contains fields that may return mapping errors.
32 20 4 BIT(1) Qddfrdrv Derived fields (logical files only). If on, indicates the format contains fields derived from fields in the physical file on which the logical file is based, or from fields in this logical file.
32 20 5 BIT(1) Qddfrni Neither or input-only files (logical files only). If on, indicates the format contains fields that cannot be used for input or output operations, or fields that can be used for input operations only.
32 20 6 BIT(1) Qddfrdfi Default values (physical files only). If on, indicates the format contains fields with default values (DFT).
32 20 7 BIT(1) Qddfcato Concatenated fields (logical files only). If on, indicates the format contains fields that are concatenations of two or more fields from the physical file.
33 21
BINARY(4) Qddfxlto Offset from the start of the Qdb_Qddfmt header to the translate table specifications, Qddfxl.
37 25
BINARY(4) Qddfrcao Offset from the start of the Qdb_Qddfmt header to the case selection specifications, Qddfcsl.
41 29
BINARY(4) Qddfdico Offset from the start of the Qdb_Qddfmt header to the IDDU/SQL dictionary format information, Qddfdic .
45 2D
BINARY(2) Qddfrcid Common coded character set identifier. Before using this field, see if Qddfrsid is zero. If it is zero, not all character fields in the format use the same CCSID and this field is not valid.
47 2F
BINARY(2) Qddfsrcd Source file coded character set identifier. The CCSID for the character portion of the source file containing the DDS used to create the format.
49 31
BINARY(2) Qddfrtcd Format text coded character set identifier. The CCSID for the information about the text description.
51 33
BINARY(2) Qddfrlcd Long comment coded character set identifier. The CCSID for the information about the format content and purpose.
53 35
CHAR(7) Reserved_64 Reserved.
60 3C
CHAR(1) Qddftflgs Format flags.
60 3C 0 BIT(1) Qddfr12 Reserved.
60 3C 1 BIT(1) Qddfucsd If on, the format contains UCS-2 fields.
60 3C 2 BIT(1) Qddfdlnk If on, the format contains datalink fields.
60 3C 3 BIT(1) Qddfdudt If on, the format contains user-defined type fields.
60 3C 4 BIT(1) Qddfdlob If on, the format contains large object fields.
60 3C 5 BIT(1) Qddfutfd If on, the format contains a UTF-8 or UTF-16 field.
60 3C 6 BIT(2) Reserved_114 Reserved.
61 3D
CHAR(1) Qddflgs Flags
61 3D 0 BIT(1) Reserved_65 Reserved.
61 3D 1 BIT(1) Qddfrvar Variable length fields. If on, indicates the format contains variable length fields (VARLEN).
61 3D 2 BIT(1) Qddfrgph Graphic fields. If on, indicates the format contains graphic data fields.
61 3D 3 BIT(1) Qddfrdtt Date, time, or timestamp fields. If on, indicates the format contains data, time, or timestamp fields.
61 3D 4 BIT(1) Qddfrnul Null capable fields. If on, indicates the format contains null capable fields.
61 3D 5 BIT(1) Qddfrsid Common coded character set identifier flag. If on, indicates all character fields use the same CCSID.
61 3D 6 BIT(1) Qddfesid Explicit coded character set identifier flag. If on, indicates a CCSID was specified for the format file or for one or more fields in the format.
61 3D 7 BIT(1) Reserved_66 Reserved.
62 3E
CHAR(4) Reserved_67 Reserved.
66 42
BINARY(4) Qddfrlen Record length. The sum of the lengths of all format fields excluding neither fields.
70 46
CHAR(10) Qddfname Record format name.
80 50
CHAR(13) Qddfseq Level identifier. The modification level identifier of the format, used to verity the format has not changed since compile time, if LVLCHK(*YES) is requested.
93 5D
CHAR(50) Qddftext Text description (TEXT)
143 8F
BINARY(2) Qddffldnum Number of fields. The number of fields in the format. There is one field header for each field.
145 91   BINARY(4) Qddf_Identity_ Off Offset from the start of the Format header to the identity information, Qddfidcl
256 100
Array of CHAR(*) Qddffldx Start of field definition array (Qdb_Qddffld).


Field Header (Qdb_Qddffld)

This section is located immediately after the Qdb_Qddfmt header. The number of entries in this structure is defined by variable Qddffldnum in the Qdb_Qddfmt header. This structure is to be defined at variable Qddffldx in the Qdb_Qddfmt header.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qddfdefl Length of field header structure. The length of each occurrence of the field header structure, including all subsections.
4 4
CHAR(30) Qddffldi Internal field name. The name of the physical format field. If this is a logical format, the name of the physical field on which the logical field is based.
34 22
CHAR(30) Qddfflde External field name. If this is a logical format, the logical format field name. If this is a physical format, the internal name is a duplicate of Qddfflde.
64 40
CHAR(2) Qddfftyp Data type.
X'0000'
BINARY
X'0001'
FLOAT
X'0002'
ZONED DECIMAL
X'0003'
PACKED DECIMAL
X'0004'
CHARACTER
X'8004'
VAR CHARACTER
X'0005'
GRAPHIC
X'8005'
VAR GRAPHIC
X'0006'
DBCS-CAPABLE
X'8006'
VAR DBCS-CAPABLE
X'000B'
DATE
X'000C'
TIME
X'000D'
TIMESTAMP
X'4004'
BLOB/CLOB
X'4005'
DBCLOB
X'4006'
CLOB-OPEN
X'8044'
DATALINK-CHAR
X'8046'
DATALINK-OPEN
X'FFFF'
NULL
66 42
CHAR(1) Qddffiob Usage
X'01'
The field can be used for input only.
X'02'
Output only.
X'03'
Both input and output.
X'04'
Neither input nor output.
X'FF'
The usage is unknown.
67 43
BINARY(4) Qddffobo Output buffer offset. The offset of this field from the start of the output buffer.
71 47
BINARY(4) Qddffibo Input buffer offset. The offset of this field from the start of the input buffer.
75 4B
BINARY(2) Qddffldb Length. The length of the field. For character fields: the number of characters. For float fields: 4 for single, 8 for double. For variable length fields: the maximum the field can be plus 2. For date, time, or timestamp fields: the length of the formatted data. For graphic data fields: the number of bytes. For LOB fields: the number of bytes in the buffer.
77 4D
BINARY(2) Qddffldd Number of digits. The number of digits in the field. For numeric fields: the number of digits. For graphic data fields: the number of DBCS characters the field can contain.
79 4F
BINARY(2) Qddffldp Decimal positions. The number of position to the right of the decimal point.
81 51
CHAR(1) Qddffkbs Keyboard shift (RESHIFT) The keyboard shift attribute of the field.
X
Alphabetic only.
A
Alphameric shift.
N
Numeric shift.
S
Signed numeric.
Y
Numeric only.
D
Digits only.
M
Numeric only character.
W
Katakana.
H
Hexadecimal.
I
Inhibit keyboard entry.
J
DBCS only.
E
DBCS either.
O
DBCS open.
B
Binary character.
X'00'
No shift expected.
82 52
CHAR(1) Qddffldst Field status byte 1
82 52 0 BIT(1) Qddffiat Double-byte character set (DBCS) alternate type field. If on, indicates the alternate type for this field contains DBCS data.
82 52 1 BIT(1) Qddffitx Double-byte character set (DBCS) field text description. If on, indicates the text description contains DBCS data.
82 52 2 BIT(1) Qddffich Double-byte character set (DBCS) column headings. If on, indicates the column headings contains DBCS data.
82 52 3 BIT(1) Qddffivc Double-byte character set (DBCS) validity checking literals. If on, indicates the compare, range, or values literals contain DBCS data.
82 52 4 BIT(1) Qddffrnd Rounding. Rounding method for the field. If on, indicates round insignificant decimal digits. If off, indicates truncate insignificant decimal digits.
82 52 5 BIT(1) Qddffcid Character identifier flag. If on, indicates a character identifier was specified.
82 52 6 BIT(2) Reserved_62 Reserved.
83 53
BINARY(2) Qddfjref Join reference (JREF) (logical files only). For fields whose names are specified in more than one physical file, this values identifies which physical file contains the field.
85 55
CHAR(1) Qddffldst2 Field status byte 2.
85 55 0 BIT(1) Qddffnul Allow null value (ALWNULL). If on, indicates the null value is allowed for this field.
85 55 1 BIT(1) Qddffdft Column default value. If on, indicates the column does not have a default value.
85 55 2 BIT(1) Qddffvar If on, indicates the column is a variable length field.
85 55 5 BIT(5) Reserved_70 Reserved.
86 56
CHAR(1) Qddflgs2 Flags.
86 56 0 BIT(1) Qddfcorr Correlated field. If on, indicates this is a correlated field.
86 56 1 BIT(1) Qddffrrn File relative record number. If on, indicates this is a relative record number field.
86 56 2 BIT(5) Reserved_71 Reserved.
86 56 7 BIT(1) Qddffmep Mapping errors possible. If on, indicates the field may return data mapping errors.
87 57
BINARY(2) Qddfvarx Variable field index. Index into the list of all variable field values for the query.
89 59
CHAR(2) Reserved_72 Reserved.
91 5B
BINARY(2) Qddflalc Allocated length. The number of bytes allocated for the field in the fixed portion of the file.

Or:

Date/time/timestamp length. The number of bytes the based on field occupies.

93 5D
CHAR(1) Qddfdttf Date format (DATFMT) or time format (TIMFMT), depending on the use of the field. This field is not valid unless Qddfftyp is X'000B', X'000C', or X'000D' except for the following cases. DATFMT and TIMFMT are valid on '0002'X type logical file fields having based-on physical file fields that are '000B'X and '000C'X. DATFMT is valid on '0003'X and '0004'X type logical file fields having based-on physical file fields that are '000B'X. Some DATFMTs are valid only for the the '0002'X, '0003'X, and '0004'X fields having based-on physical file '000B'X fields and are identified (by pseudo date) below.
X'FE'
The format associated with the job.
X'FF'
The format associated with the QDT.
X'01'
The *USA format.
X'03'
The *ISO format.
X'05'
The *EUR format.
X'07'
The *JIS format (date only).
X'09'
The SAA timestamp.
X'17'
The *MDY format (date only).
X'18'
The *DMY format (date only).
X'19'
The *YMD format (date only).
X'1A'
The *JUL format (date only).
X'1B'
The *HMS format (time only).
X'25'
The *CMDY format (pseudo date).
X'26'
The *CDMY format (pseudo date).
X'27'
The *CYMD format (pseudo date).
X'28'
The *MDYY format (pseudo date).
X'29'
The *DMYY format (pseudo date).
X'2A'
The *YYMD format (pseudo date).
X'2B'
The *YM format (pseudo date).
X'2C'
The *MY format (pseudo date).
X'2D'
The *YYM format (pseudo date).
X'2E'
The *MYY format (pseudo date).
X'30'
The *LONGJUL format (pseudo date).
94 5E
CHAR(1) Qddfdtts Date separator (DATSEP) or Time separator (TIMSEP) This field is not valid unless Qddfftyp is X'000B', X'000C', or X'000D'.
X'00'
The separator associated with the job.
X'EE'
The implied separator is used.
'/'
The slash is used.
'-'
The dash is used.
'.'
The period is used.
' '
The blank is used.
':'
The colon is used.
95 5F
BINARY(2) Qddfcsid Common coded character set identifier (CCSID).
00000
The CCSID associated with the job is used.
65535
No data translation is done.
nnnnn
The CCSID.
97 61
BINARY(2) Qddftsid Text description common coded character set identifier.
00000
The CCSID associated with the job is used.
65535
No data translation is done.
nnnnn
The CCSID.
99 63
BINARY(2) Qddfhsid Column heading common coded character set identifier.
00000
The CCSID associated with the job is used.
65535
No data translation is done.
nnnnn
The CCSID.
101 65
BINARY(2) Qddflsid Long comment common coded character set identifier.
00000
The CCSID associated with the job is used.
65535
No data translation is done.
nnnnn
The CCSID.
103 67
CHAR(1) Qddfldur Labeled duration. The type of labeled duration this field defines.
X'00'
The field not a labeled duration.
X'0D'
Year/years.
X'0E'
Month/months.
X'0F'
Day/days.
X'10'
Hour/hours.
X'11'
Minute/minutes.
X'12'
Second/seconds.
X'13'
Microsecond/microseconds.
104 68
CHAR(1) Qddfflgs Flags. These flags indicate the user-specified value for the field at the time the format was created. These flags only apply to date, time, and timestamp fields. If the format was ever shared, these flags may not be applicable to the file for which the API was called.
104 68 0 BIT(1) Qdddatfmt_dft If on, indicates DATFMT was defaulted.
104 68 1 BIT(1) Qdddatfmt_job If on, indicates DATFMT(*JOB) was specified.
104 68 2 BIT(1) Qdddatsep_dft If on, indicates DATSEP was defaulted.
104 68 3 BIT(1) Qdddatsep_job If on, indicates DATSEP(*JOB) was specified.
104 68 4 BIT(1) Qddtimfmt_dft If on, indicates TIMFMT was defaulted.
104 68 5 BIT(1) Qddtimsep_dft If on, indicates TIMSEP was defaulted.
104 68 6 BIT(1) Qddtimsep_job If on, indicates TIMSEP(*JOB) was specified.
104 68 7 BIT(1) QddSAAfmt SAA format was specified.
105 69
BINARY(2) Qddfwsid Edit word common coded character set identifier.
00000
The CCSID associated with the job is used.
65535
No data translation is done.
nnnnn
The CCSID.
107 6B
CHAR(1) Reserved_61 Reserved.
108 6C
CHAR(1) Reserved_62 Reserved.
109 6D
BIN(2) Reserved_63 Reserved.
111 6F
CHAR(1) Qddflagco Flags.
111 6F 0 BIT(3) Reserved_64 Reserved.
111 6F 3 BIT(1) Qddffucs If on, indicates the column is a UCS-2 field.
111 6F 4 BIT(1) Qddfudt If on, indicates the column is a user-defined type field.
111 6F 5 BIT(1) Qddf_Identity_ Col If on, indicates the column is an identity column.
111 6F 6 BIT(1) Qddf_Rowid_ Col If on, indicates the column is a row ID column.
111 6F 7 BIT(1) Qddfutf If on, indicates the field is a UTF-8 or UTF-16 field.
112 70
CHAR(5) Qdducs2co UCS-2 Field Information
112 70
BINARY(2) Qddfdspl Used with a UCS-2 field when the CCSID keyword modifies the display length.
114 72 0 BIT(1) Qddfucsp When referenced by a printer file, indicates whether UCS-2 characters are to be converted before printing. If on, do not convert.
114 72 1 BIT(1) Qddfucsm Minimum-display-length-flag, when referenced by a display file. If on, Qddfdspl contains the number of display positions allowed equal to the field length defined in the DDS.
114 72 2 BIT(1) Qddfucsl Length-of-display-field_flag, when referenced by a display file. If on, the DDS for the field provided the allowed number of display positions. This number is in Qddfdspl.
114 72 3 BIT(5) Reserved_130 Reserved.
115 73
CHAR(2) Qddfencode Encoding scheme for field's CCSID. '0000'X means no encoding scheme.
117 75   CHAR(63) Reserved_74 Reserved.
180 B4
BINARY(4) Qddfcplx Offset from the start of the field header to the field information if the field was a user-defined type, datalink, or large object. See structure Qdb_Qddfcpli.
184 B8
BINARY(4) Qddfbmaxl Maximum length of the large object field.
188 BC
BINARY(2) Qddfbpadl Pad length of the large object field.
190 BE
BINARY(4) Qddfdicd Offset from the start of the field header to the IDDU/SQL dictionary field information, Qddfdicf.
194 C2
BINARY(4) Qddfdftd Offset from the start of the field header to the default value description, Qddfdft.
198 C6
BINARY(4) Qddfderd Offset from the start of the field header to the derived field description (or to the concatenated field description if its file is externally described), Qddfderv.
202 CA
CHAR(6) Reserved_75 Reserved.
208 D0
BINARY(4) Qddftxtd Offset from the start of the field header to the field text description, Qddfftxt.
212 D4
CHAR(2) Reserved_102 Reserved.
214 D6
BINARY(4) Qddfrefd Offset from the start of the field header to the field reference information, Qddfrefi.
218 DA
BINARY(2) Qddfedtl Length of the edit code/edit word for the field.
220 DC
BINARY(4) Qddfedtd Offset from the start of the field header to the edit code/edit word information, Qddfedcw.
224 E0
BINARY(2) Reserved_76 Reserved.
226 E2
BINARY(4) Qddfchd Offset from the start of the field header to the column heading information, Qddfcolh.
230 E6
BINARY(2) Qddfvckl Length of validity checking data present for the field.
232 E8
BINARY(4) Qddfvckd Offset from the start of the field header to the validity checking data, Qddfvchk.
236 EC
BINARY(4) Qddfxals Offset from the start of the field header to the alias name entry.
240 F0
BINARY(4) Qddffpnd Offset from the start of the field header to the field prompted numeric editing information, Qddfdfne.
244 F4
CHAR(8) Reserved_77 Reserved.
252 FC
CHAR(*) Qddfvpx Start of the variable portion of the field description.


Reference Information (Qdb_Qddfrefi)

You can locate the Qdb_Qddfrefi section with the offset Qddfrefd in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(1) Qddfrcde Modification flags.
0 0 0 BIT(1) Qddfdupe Modifications. If on, indicates the field has been modified.
0 0 1 BIT(1) Qddfnmec Name modification. If on, indicates the name of the field has been modified.
0 0 2 BIT(1) Qddftypc Data type modification. If on, indicates the data type of the field has been modified.
0 0 3 BIT(1) Qddflenc Field length modification. If on, indicates the length of the field has been modified.
0 0 4 BIT(1) Qddfdecc Precision modification. If on, indicates the precision of the field has been modified.
0 0 5 BIT(1) Qddfedtc Edit information modification. If on, indicates the edit information of the field has been modified.
0 0 6 BIT(1) Qddfvc Validity checking information modification. If on, indicates the validity checking information of the field has been modified.
0 0 7 BIT(1) Qddfothr Other modification. If on, indicates other information of the field has been modified.
1 1
CHAR(10) Qddfrfil Reference file name.
11 B
CHAR(10) Qddfrlib Reference file library.
21 15
CHAR(10) Qddfrfmt Referenced record format.
31 1F
CHAR(30) Qddfrfld Referenced field.
61 3D
CHAR(19) Reserved_78 Reserved.


Field Prompted Numeric Editing Information (Qdb_Qddfdfne)

You can locate the Qdb_Qddfdfne section with the offset Qddffpnd in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(2) Reserved_80 Reserved.
2 2
CHAR(1) Qddfddts Date separator (DATSEP) or Time separator (TIMSEP).
X'00'
This is not a date or time field.
1
The period (.).
2
The slash (/).
3
The colon (:).
4
The dash (-).
5
The comma (,).
3 3
CHAR(1) Qddfddpc Decimal point character. This field is not valid unless Qddfddts contains X'00'.
1
The period (.).
2
The comma (,).
3
The colon (:).
4
The dollar ($).
5
No decimal point is used.
4 4
CHAR(1) Qddfdtsc Thousands separator character. This field is not valid unless Qddfddts contains X'00'.
1
The period (.).
2
The comma (,).
3
The apostrophe (').
4
The blank ( ).
5
No thousands separator is used.
5 5
CHAR(13) Qnsi Negative sign information.
5 5
CHAR(1) Qddfdnsc Display negative sign. This field is not valid unless Qddfddts contains X'00'.
1
The negative sign is displayed for negative values.
2
The negative is not displayed for negative values.
6 6
CHAR(6) Qddfdnsl Left negative sign value. This field is not valid unless Qddfddts contains X'00'.
12 C
CHAR(6) Qddfdnsr Right negative sign value. This field is not valid unless Qddfddts contains X'00'.
18 12
CHAR(13) Qcsi Currency symbol information.
18 12
CHAR(1) Qddfdcsv Display currency symbol. This field is not valid unless Qddfddts contains X'00'.
1
The currency symbol is displayed.
2
The currency symbol is not displayed.
19 13
CHAR(6) Qddfdcsl Left currency symbol value. This field is not valid unless Qddfddts contains X'00'.
25 19
CHAR(6) Qddfdcsr Right currency symbol value. This field is not valid unless Qddfddts contains X'00'.
31 1F
CHAR(1) Qddfdpzv Print zero value. This field is not valid unless Qddfddts contains X'00'.
1
A zero value is displayed.
2
A zero value is not displayed.
32 20
CHAR(1) Qddfdrlz Replace leading zeros. This field is not valid unless Qddfddts contains X'00'.
1
Leading zeros are replaced.
2
Leading zeros are not replaced.
33 21
CHAR(1) Qddfdrlv Leading zero replacement value. This field is not valid unless Qddfddts contains X'00'.
1
Blanks ( ).
2
Asterisks (*).
3
Blanks ( ) and the left currency symbol is shifted right.
34 22
CHAR(1) Qddfdlzo Single leading zero. This field is not valid unless Qddfddts contains X'00'.
1
A zero is displayed to the left of the decimal point when there are no significant digits to the left of the decimal.
2
A zero is not displayed to the left of the decimal point.
35 23
CHAR(29) Reserved_81 Reserved.


Edit Code/Edit Word Information (Qdb_Qddfedcw)

You can locate the Qdb_Qddfedcw section with the offset Qddfedtd in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(2) Qddfecdi Edit code information.
0 0
CHAR(1) Qddfecde Edit code (EDTCDE). Edit code for the field when it is referred to during display or print file creation.
1 1
CHAR(1) Qddfecdx Floating currency symbol.
*
Asterisk protection: asterisks are displayed to the left of significant digits.

A currency symbol indicates the symbol displayed to the left the significant digits.

2 2
CHAR(14) Reserved_79 Reserved
16 10
CHAR(*) Qddfewd Edit word (EDTWRD). The form in which the field values are displayed.


Validity Checking Information (Qdb_Qddfvchk)

You can locate the Qdb_Qddfvchk section with the offset Qddfvckd in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(2) Qddfvcnume Number of validity check entries.
2 2
CHAR(14) Reserved_82 Reserved.
16 10
CHAR(*) Qddfvcen Validity checking entry array.


Validity Checking Entry (Qdb_Qddfvcst)

The first validity checking entry starts at Qddfvcen in the validity checking information section, Qdb_Qddfvchk.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(1) Qddfvccd DDSI keyword identifier.
X'63'
CHKMSGID
X'64'
CHECK(ME)
X'66'
CHECK(FE)
X'67'
CHECK(MF)
X'71'
RANGE
X'72'
VALUES
X'73'
COMP(GT)
X'74'
COMP(GE)
X'75'
COMP(EQ)
X'76'
COMP(NE)
X'77'
COMP(LE)
X'78'
COMP(LT)
X'79'
COMP(NL)
X'7A'
COMP(NG)
X'A0'
CHECK(M10)
X'A1'
CHECK(M11)
X'A2'
CHECK(VN)
X'A3'
CHECK(AB)
X'A5'
CHECK(VNE)
X'A6'
CHECK(M10F)
X'A7'
CHECK(M11F)
1 1
BINARY(2) Qddfvcnump Number of parameters.
3 3
BINARY(2) Qddfvcel Length of this validity checking entry.
5 5
CHAR(11) Reserved_83 Reserved.
16 10
CHAR(*) Qddfvcpm Validity checking parameter array.


Validity Checking Parameter (Qdb_Qddfvcpr)

The first validity checking parameter starts at Qddfvcpm in the validity checking entry section, Qdb_Qddfvcst.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(2) Qddfvcpl Length of validity checking parameter Qddfvcpv.
2 2
CHAR(14) Reserved_84 Reserved.
16 10
CHAR(*) Qddfvcpv Validity checking parameter value.


Complex Object Field Type Information (Qdb_Qddfcpli)

You can locate the Qdb_Qddfcpli section with the offset Qddfcplx in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qddflenu Length of the user-defined type name.
4 4
CHAR(128) Qddfnudt User-defined type name.
132 84
CHAR(10) Qddfludt User-defined type library name.
142 8E
CHAR(1) Qddfdlink Link control.
N
No link control.
F
File link control.
143 8F
CHAR(1) Qddfdinte Link integrity. Linked files are under control of the database if the field is a datalink.
A
All under control.
S
Selective control. This value is not supported yet.
144 90
CHAR(2) Qddfdrper Read permission. The file system controls authority to read a file if the field is a datalink.
FS
File system.
DB
Database.
146 92
CHAR(2) Qddfdwper Write permission. The file system controls authority to write to a file if the field is a datalink.
FS
File system.
BL
Blocked.
148 94
CHAR(1) Qddfdreco Recovery. The database manager will recover the file if the field is a datalink.
Y
Yes. This value is not supported yet.
N
No.
149 95
CHAR(1) Qddfdunlk On unlink. The database manager will either restore the file owner on an unlink, or delete the file when unlinking the file.
R
Restore the owner.
D
Delete the file.
150 96
CHAR(10) Reserved_150 Reserved.


Field Text (Qdb_Qddfftxt)

You can locate the Qdb_Qddfftxt section with the offset Qddftxtd in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(50) Qddfftxt Text (TEXT). Text description of the field.


Alias Name Structure (Qdb_Qddfalis)

You can locate this section with the offset Qddfxals located in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(2) Qddfalsl Length of alternative name Qddfalsn.
2 2
CHAR(14) Reserved_85 Reserved.
16 10
CHAR(258) Qddfalsn Alternative name (ALIAS).


Default Value Description Information (Qdb_Qddfdft)

You can locate the Qdb_Qddfdft section with the offset Qddfdftd in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(2) Qddfdftl Length of default information.
2 2
CHAR(1) Qddfdfta Default attributes.
2 2 0 BIT(1) Qddfdfig DBCS or graphic default. If on, indicates the default is a DBCS or graphic literal.
2 2 1 BIT(1) Qddfdfhx Hex default. If on, indicates the default is a hexadecimal literal.
2 2 2 BIT(1) Qddfndft Null default. If on, indicates the default is null.
2 2 3 BIT(2) Reserved_86 Reserved.
2 2 5 BIT(1) Qddfdcur DATE, TIME, or TIMESTAMP default. On indicates the default is CURRENT_DATE, CURRENT_TIME, or CURRENT_TIMESTAMP.
2 2 6 BIT(1) Reserved_109 Reserved.
2 2 7 BIT(1) Qddfdftk DFT or DFTVAL keyword. If on, indicates the DFTVAL keyword was specified.
3 3
CHAR(13) Reserved_87 Reserved.
16 10
CHAR(*) Qddfdftv Default (DFT) or (DFTVAL). A value of USER indicates that the default value for this field is the job's current user.


Identity Column Information (Qdb_Qddfidcl)

You can locate the Qdb_Qddfidcl section with the offset Qddf_Identity_Off in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0   BINARY(2) Qddf_Id_ Len Length of IDENTITY information.
2 2   DECIMAL(31,0) Qddf_Id_ Orig_Start_With Original START WITH value.
18 12   DECIMAL(31,0) Qddf_Id_ Curr_Start_With Current START WITH value.
34 22   BINARY(4) Qddf_Id_ Increment_By INCREMENT BY value.
38 26   DECIMAL(31,0) Qddf_Id_ Minimum MINIMUM value.
54 36   DECIMAL(31,0) Qddf_Id_ Maximum MAXIMUM value.
70 46   CHAR(1) Qddf_Id_ Cycle CYCLE indicator.
1 = Cycling will occur.
0 = Cycling will not occur.
71 47   CHAR(1) Qddf_Id_ Order ORDER mode indicator.
1 = Values are generated in order of request.
0 = Values do not need to be generated in order of request.
72 48   CHAR(1) Qddf_Id_ Generate Identity GENERATE indicator.
1 = GENERATE BY DEFAULT. 0 = GENERATE ALWAYS.
73 49   BINARY(4) UNSIGNED Qddf_Id_ Curr_Cache CACHE value.
77 4D   CHAR(1) Qddf_Rowid_ Generate Rowid GENERATE indicator.
1 = GENERATE BY DEFAULT. 0 = GENERATE ALWAYS.
78 4E   CHAR(53) Qddf_Id_ Reserved1 Reserved.


Derived Field Description Information

The derived field structure is a stack of operators and operands in postfix notation. Postfix notation is a method of forming mathematical expressions in which each operator is preceded by its operands and indicates the operation to be performed on the operands or the intermediate results that precede it. For example:

A + B
would be:
A B +

Numeric operands and character operands cannot be mixed in one derived field description. If numeric operands are specified, the resulting field attributes must be numeric. If character operands are specified, the resulting field attributes must be character or DBCS. Character and DBCS only fields cannot be mixed in one derived field description.

Substringing DBCS fields is allowed, although the data is treated as character data, that is, there is no true double-byte substring support. This applies to query formats only.


Derived Field Header (Qdb_Qddfderv)

You can locate this section, Qdb_Qddfderv, with the offset Qddfderd in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qddfdvtl Length of derived field information Qddfderv.
4 4
BINARY(2) Qddfdvnume Number of derived field entries. 0 indicates it is a concatentated field.
6 6
BINARY(4) Qddfdvot Offset from the start of this header to the derived field text (or to the concatenated field text), Qddfdvtx .
10 A
CHAR(6) * Reserved.
16 10
CHAR(*) Qddfdven Derived field entry.


Derived Field Entry (Qdb_Qddfdvst)

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Qddfdvln Length of derived field entry, Qddfdvst.
4 4
BINARY(2) Qddfdtyp Derived field entry type.
0
A field operand.
1
A constant operand.
2
An operator.
6 6
CHAR(*) Qddfdv The union of the Field operand (Qdddvof), Constant operand (Qddffvoc), and Operator entry (Qddfdvo).


Field Operand Entry (Qdb_Qddfdvof)

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(30) Qddfdvon Field name.
30 1E
BINARY(2) Qddfdvjr Join reference (JREF). Relative file number of the physical file containing the external file referenced.
0
The fields previously defined in this format are searched for the field name.

If the field is not found, the based on file formats are searched. If the field name is found in more than one file format, an error is signalled.

n
The file containing the field name.
32 20
BINARY(2) Qddfdv01 Starting position. The starting position in the field of the substring (SST) specified.
34 22
BINARY(2) Qddfdvo2 Ending position. The ending position in the field of the substring (SST) specified.
36 24
BINARY(2) Qddfqdtnum Qdt from which this correlated field originates (only applicable for SQL subqueries.
38 26
CHAR(20) * Reserved.


Constant Operand Entry (Qdb_Qddfdvoc)

Offset Bit Type Field Description
Dec Hex
0 0
* Qddfdvoh Constant operand header.
0 0
BINARY(4) Qddfdvol Length of constant Qddfdvov.
4 4
CHAR(1) Qca Constant attributes.
4 4 0 BIT(1) Qddfdvci DBCS constant. If on, indicates the constant is a DBCS-open literal.
4 4 1 BIT(1) Reserved_90 Reserved.
4 4 2 BIT(1) Qddfdvcc Character constant type. If on, indicates the constant is an unquoted character string not bracketed by single quotes. Imbedded quotes are represented with a single quote. If off, indicates it is quoted, bracketed by single quotes. Imbedded quotes are represented with two single quotes.
4 4 3 BIT(1) Qddfdvac Assume character constant. If on, indicates the system assumes this is a character constant.
4 4 4 BIT(1) Qddfdvco DBCS-only literal. If on, indicates the constant is a DBCS-only literal.

This attribute is not valid if the DBCS constant attribute, Qddfdvci, is off.

4 4 5 BIT(1) Qddfdvsr Special register. If on, indicates this constant is a special register defined by Qddfdvrc.
4 4 6 BIT(1) Qddfdvnl Null indicator. If on, indicates the constant is a null literal.
4 4 7 BIT(1) Reserved_91 Reserved.
5 5
CHAR(1) Qddfdvrc Special register constant. Defined by special register constants, can only be specified if Qddfdvsr is on.
6 6
CHAR(1) Qddfdvft Date constant format (DATFMT) or Time constant format (TIMFMT)
X'FE'
Format associated with the job is used.
X'FF'
Format associated with QDT is used.
X'01'
The *USA format.
X'03'
The *ISO format.
X'05'
The *EUR format.
X'07'
The *JIS format.
X'09'
The SAA timestamp format.
X'17'
The *MDY date format.
X'18'
The *DMY date format.
X'19'
The *YMD date format.
X'1A'
The *JUL date format.
X'1B'
The *HMS time format.
7 7
CHAR(1) Qddfdvsp Date constant separator (DATSEP) or Time constant separator (TIMSEP)
X'00'
Default separator associated with job is used.
X'EE'
The implied separator is used.
'/'
The slash.
'-'
The dash.
'.'
The period.
','
The comma.
' '
The blank.
':'
The colon.
8 8
CHAR(2) Reserved_92 Reserved.
10 A
BINARY(2) Qddfdvcd Constant coded character set identifier (CCSID).
13 C
CHAR(1) Qddfcflg Constant flags.
13 C 0 BIT(2) Reserved_93 Reserved.
13 C 2 BIT(1) Qddfglit Graphics literal. If on, indicates this is a graphics literal.
13 C 3 BIT(5) Reserved_94 Reserved.
14 E
CHAR(29) Reserved_95 Reserved.
43 2B
CHAR(*) Qddfdvov Derived constant. The external form of the constant.


Operator Entry (Qdb_Qddfdvo)

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(1) Qddfdvop Derived operator.

Operators requiring three operands:

X'27'
Substring
          Operators requiring two operands:
X'01'
Concatenation
X'04'
Addition
X'05'
Subtraction
X'06'
Multiplication
X'07'
Division
X'08'
Minimum
X'09'
Maximum
X'1A'
X to the Y power
X'1B'
Binary OR
X'1C'
Binary XOR
X'1D'
Binary AND
X'24'
Strip leading
X'25'
Strip tailing
X'26'
Strip both
X'35'
Compute
X'41'
String position
X'80'
Remainder
          Operators requiring one operand:
X'02'
Map
X'03'
Direct map
X'0A'
Absolute value
X'0B'
Translate
X'0C'
Natural logarithm
X'0D'
Exponential
X'0E'
Sine
X'0F'
Cosine
X'10'
Tangent
X'11'
Cotangent
X'12'
Arc sine
X'13'
Arc cosine
X'14'
Arc tangent
X'15'
Hyperbolic sine
X'16'
Hyperbolic cosine
X'17'
Hyperbolic tangent
X'18'
Hyperbolic arctangent
X'19'
Square root
X'1E'
Binary NOT
X'1F'
Negation
X'23'
Length
X'29'
Year
X'2A'
Month
X'2B'
Day
X'2C'
Days.
X'2D'
Hour
X'2E'
Minute
X'2F'
Second
X'30'
Microsecond
X'31'
Date
X'32'
Time
X'34'
Hex
          Operators requiring one operand continued:
X'36'
Test translate CCSID
X'37'
Translate monocase
X'3C'
Node number
X'3D'
Cast
X'47'
Partition
X'48'
Node name
X'83'
Log (base 10)
X'84'
Anti log (base 10)
X'85'
Digits
X'86'
Char
X'8F'
Graphic representation of character
X'90'
Character representation of graphic
          Label duration operators:
X'87'
Year
X'88'
Month
X'89'
Day
X'8A'
Hour
X'8B'
Minute
X'8C'
Second
X'8D'
Microsecond
          Operators requiring one to many operands:
X'3A'
Hash function
          Operators requiring two to many operands:
X'28'
Null values
X'3E'
Case Expression
          Operators requiring one or two operands:
X'33'
Timestamp
          Group by operators: All require one operand except count that requires one or two.
X'A1'
Count
X'A3'
Sum
X'A4'
Minimum
X'A5'
Maximum
X'B0'
Average
X'B1'
Standard deviation
X'B2'
Variance
1 1
CHAR(2) Qddfdvxnum Translate table index or case selection specification index. This field is valid only if Qddfdvop is X'OB' or X'3E'.
1 1
CHAR(1) Qddfdvdtfmt Operator date format index.
1 1
CHAR(1) Qddfdvdtsep Operator date separator index.
3 3
CHAR(1) Qddfdvfm Operator date format (DATFMT) or Operator time format (TIMFMT).
X'FE'
Format associated with the job is used.
X'FF'
Format associated with QDT is used.
X'01'
The *USA format.
X'03'
The *ISO format.
X'05'
The *EUR format.
X'07'
The *JIS format.
X'09'
The SAA timestamp format.
X'17'
The *MDY date format.
X'18'
The *DMY date format.
X'19'
The *YMD date format.
X'1A'
The *JUL date format.
X'1B'
The *HMS time format.
4 4
CHAR(1) Qddfdvsa Operator date separator (DATSEP) or Operator time separator (TIMSEP)
X'00'
Default separator associated with job is used.
X'EE'
The implied separator is used.
'/'
The slash.
'-'
The dash.
'.'
The period.
','
The comma.
' '
The blank.
':'
The colon.
5 5
BINARY(2) Qddfdvno Number of operands.
7 7
CHAR(1) Qoa Operator attributes.
7 7 0 BIT(1) Reserved_96 Reserved.
7 7 1 BIT(1) Qddfdvdttm Operator date format and separator source. If on, indicates Qddfdvdtfmt and Qddfdvdtsep are used as the date format and separator with the CHAR operator. Qddfdvfm and Qddfdvsa are used as the time format and separator with the CHAR operator.
7 7 2 BIT(1) Reserved_n Reserved.
7 7 3 BIT(1) Qddfdvdf Group operators. If on, do not include duplicate field values in group by operation. If off, include duplicate field values in group by operation.
7 7 4 BIT(1) Reserved_97 Reserved.
7 7 5 BIT(1) Qddffunc_char Number of characters option. If on, the result of the operator is based on the number of characters. If off, the result of the operator is based on the number of bytes. This field is only applicable when Qddfdvop is POSSTR(X'41'), LENGTH(X'23'), or SUBSTRING(X'27).
7 7 6 BIT(2) Reserved_115 Reserved.
8 8
CHAR(2) Reserved_98 Reserved.
10 A
CHAR(1) Qddfd_ decptchar The character to use for the decimal point. Only applicable if Qddfdvop is a CAST(X'3D') and one of the operands is numeric and the other is character, or if Qddfdvop is a CHAR(X'86') and the first operand is packed decimal.
11 B
BIN(4) Qddfdo_func_ def Offset from the beginning of this derived field entry (Qdb_Qddfdvst) to the Function Name Specification section, Qddfunc_def . If this offset is specified, then the function is resolved to using the name in the Function Name Specification section. If the Function Name section is specified, all entries in this operator section are ignored except for the number of operands for the function, Qddfdvno, which is required to be set, and the duplicate field values indicator, Qddfdvdf, which can be optionally set. decimal.
15 F   CHAR(11) Reserved_101 Reserved.


Derived Field Text Information (Qdb_Qddfdvtx)

You can locate the Qdb_Qddfdvtx section with the offset Qddfdvot in the Derived Field Header section, Qdb_Qddfderv.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(2) Qddfdvlt Length of derived field text information or concatenated field text information.
2 2
CHAR(*) Qddfdtxt Derived field text description or concatenated field text description.


Column Heading Information (Qdb_Qddfcolh)

You can locate the Qdb_Qddfcolh section with the offset Qddfchd in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(20) Qddfch1 Column heading #1. The first column heading specified on the COLHDG DDS keyword without the quotes.
20 14
CHAR(20) Qddfch2 Column heading #2. The second column heading specified on the COLHDG DDS keyword without the quotes.
40 28
CHAR(20) Qddfch3 Column heading #3. The third column heading specified on the COLHDG DDS keyword without the quotes.


IDDU/SQL Dictionary Format Information (Qdb_Qddfdic)

You can locate the Qdb_Qddfdic section with the offset Qddfdico in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0   CHAR(32) Reserved_100 Reserved.
32 20     Qddfdicm Format definition long comment information.
32 20   BINARY(2) Qddfdilt Length of format definition long comment information, Qddfdicm.
34 22
CHAR(*) Qddfditx Format definition long comment.


IDDU/SQL Dictionary Field Information (Qdb_Qddfdicf)

You can locate the Qdb_Qddfdicf section with the offset Qddfdicd located in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(16) * Reserved.
16 10

Qddfdfco Field definition long comment.
16 10
BINARY(2) Qddffcl Length of field definition long comment Qddfdfco.
18 12
CHAR(*) Qddfdfct Field definition comment text.


Translate Table Specification (Qdb_Qddfxl)

You can locate the Qdb_Qddfxl section with the offset Qddfxlto in the field header section, Qdb_Qddffld.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(2) Qddfxlnum Number of elements in the translate table array.
2 2

Qddfxarr Translate table array.
2 2
CHAR(10) Qddfxtnm Translate table name.
12 C
CHAR(10) Qddfxtln Translate table library name.
22 16
BINARY(2) Qddfxcid Translate table constant coded character set identifier.
24 18
CHAR(10) Reserved_99 Reserved.
34 22
CHAR(256) Qddfxtbl Translate table.


Case Selection Specification (Qdb_Qddfcsl)

You can locate the Qdb_Qddfcsl section with the offset Qddfrcao in the field header section, Qdb_Qddffld. For a description of selection specifications, see QDBQS in the QQQQRY API.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(2) Qddfcsnum Number of elements in the case selection specification array.
2 2
BINARY(4) Qddfcln Length of this plus the length of all the selection specifications.
6 6
CHAR(10) Reserved Reserved.
16 10
Array of BINARY(4) Qddfcao Offset to the selection specification. Offset is from the start of Qdb_qdffcsl.


Function Name Specification (Qdb_Qddfunc_def)

You can locate the Qdb_Qddfunc_def section with the offset Qddfdo_func_def in the derived operator entry section, Qdb_Qddfdvo.

This section can only be specified when used in conjunction with the QQQQRY API.

This section can be used to reference a function by name rather than opcode qddfdvop. It can be used to resolve to existing built-in functions provided by the database or to user-defined functions defined in the SYSROUTINE SQL catalog in the QSYS2 library. Resolution is based on function name, number of parameters, compatible parameters and library list, in that order.

See the DB2 UDB for iSeries SQL Reference book for more information on user-defined functions and the SYSROUTINE catalog.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(20) Reserved Reserved.
20 14
CHAR(10) Qddfunc_libname Library where function can be found. Special values follow.
' '
Blank. Use the path (library list) to find the function.
'QSYS2'
Use the built-in operator provided by the database.
30 1E
BIN(2) Qddfunc_namelen Length of function name in Qddfunc_funcname.
32 20
CHAR(128) Qddfunc_funcname Name of function to resolve.





Built-in functions provided by the database in library QSYS2:
'+'
Addition. Two operands
'-'
Subtraction. Two operands
'*'
Multiplication. Two operands
'/'
Division. Two operands
'ABS'
Absolute value. One operand
'ACOS'
Arc cosine. One operand
'ANTILOG'
Antilog. One operand
'ASIN'
Arc sine. One operand
'ATAN'
Arc tangent. One operand
'ATANH'
Hyperbolic arc tangent. One operand
'AVG'
Average. One operand
'CHAR'
Character. One to two operands
'COALESCE'
First non-null value. Two to N operands
'CONCAT'
Concatenation. Two operands
'COS'
Cosine. One operand
'COSH'
Hyperbolic cosine. One operand
'COT'
Co-tangent. One operand
'COUNT'
Count. One operand
'CURDATE'
Current date. Zero operand
'CURTIME'
Current time. Zero operand
'DATE'
Date. One operand
'DAY'
Day. One operand
'DAYOFMONTH'
Day of month. One operand
'DAYOFWEEK'
Day of week. One operand
'DAYOFYEAR'
Day of year. One operand





Built-in functions (continued)
'DAYS'
Days. One operand
'DECIMAL'
Decimal of operand. One operand
'DEGREES'
Degrees. One operand
'DIGITS'
Character form of number. One operand
'DOUBLE'
Double precision. One operand
'EXP'
Natural log to the power. One operand
'FLOAT'
Floating point. One operand
'FLOOR'
Integer. One operand
'HASH'
Hash value. One to N operands
'HEX'
Hex value. One operand
'HOUR'
Hour. One operand
'IFNULL'
First non-null value. Two operands
'INT'
Integer. One operand
'LAND'
Logical AND. Two operands
'LCASE'
Lower case. One operand
'LEFT'
Left N characters. Two operands
'LENGTH'
Length. One operand
'LN'
Natural log. One operand
'LNOT'
Logical NOT. One operand
'LOCATE'
Search string in source string. Two to three operands
'LOG'
Base 10 log. One operand
'LOR'
Logical OR. Two operands
'LOWER'
Lower case. One operand
'LTRIM'
Remove leading blanks. One operand





Built-in functions (continued)
'MAX'
Max. One operand
'MAX'
Max. Two to N operands
'MICROSECOND'
Microsecond. One operand
'MIN'
Min. One operand
'MIN'
Min. Two to N operands
'MINUTE'
Minute. One operand
'MOD'
Modulo. Two operands
'MONTH'
Month. One operand
'NOW'
Current timestamp. Zero operands
'POSSTR'
Search string in source string. Two operands
'POWER'
Raise to power of. Two operands
'QUARTER'
Quarter. One operand
'REAL'
Single precision float. One operand
'RTRIM'
Trim trailing blanks. One operand
'SECOND'
Second. One operand
'SIN'
Sine. One operand
'SINH'
Hyperbolic sine. One operand
'SMALLINT'
Small integer. One operand
'SQRT'
Square root. One operand
'STDDEV'
Standard deviation. One operand
'SUBSTR'
Substr. Two to three operands
'SUM'
Sum. One operand





Built-in functions (continued)
'TAN'
Tangent. One operand
'TANH'
Hyperbolic tangent. One operand
'TIME'
Time. One operand
'TIMESTAMP'
Timestamp. One to two operands
'TRANSLATE'
Translate. One to four operands
'UCASE'
Uppercase. One operand
'UPPER'
Uppercase. One operand
'VALUE'
First non-null value. Two to N operands
'VARCHAR'
Varchar. One to three operands
'VARGRAPHIC'
Vargraph. One to three operands
'VARIANCE'
Variance. One operand
'WEEK'
Week. One operand
'XOR'
Logical exclusive OR. Two operands
'YEAR'
Year. One operand
'ZONED'
Zoned. One to four operands


FILD0300 Format (Key Field Information)

FILD0300 provides detailed information for key fields of each record format of the specified file. This structure is used by the QQQQRY API to get data from the named file. FILD0300 Format shows how this information is organized. When more than one entry can appear, the figure indicates this as in (7). To get a description of all the fields contained in this structure and to determine the offsets, see the include source supplied on the system. An offset to the key field information array of each record format is provided in the record format information structure. If 0 is returned for this offset, this record format has no key field. If -1 is returned for this offset, the size of the receiver provided is insufficient to hold the returned data. You can see this source in source file H, member name QDBRTVFD, in the QSYSINC library.

FILD0300 Format

FILD0300 Format



Key Information Header (Qdb_Qdbwh)

The Qdb_Qdbwh section is always located at the beginning of the returned data area.

Offset Bit Type Field Description
Dec Hex
0 0
BINARY(4) Byte_Ret Bytes returned. The total length, in bytes, of the data returned.
4 4
BINARY(4) Byte_Avail Bytes available. The total length, in bytes, of the key information.
8 8
BINARY(2) Max_Key_Len Maximum key length. The maximum length, in bytes, of any of the keys.
10 A
BINARY(2) Key_Count File generic key field count.
12 C
CHAR(10) Reserved Reserved.
22 16
BINARY(2) Fmt_Counts Number of formats for the file.


Record Format Key Information Array (Qdb_Qdbwhrec)

The Qdb_Qdbwhrec section is located immediately after the Qdb_Qdbwh header. This is a linked list. There is a format record for each format. The number of formats is stored in Fmt_Counts in the Qdb_Qdbwh header.

Offset Bit Type Field Description
Dec Hex
0 0
CHAR(10) Rec_Name Record format name. The name of this particular record format for the file.
10 A
CHAR(2) Reserved Reserved.
12 C
BINARY(2) Num_Of_Keys Number of record format key fields.
14 E
CHAR(14) Reserved Reserved.
28 1C
BINARY(4) Key_Info_Offset Offset to the key field description array for this record format.


Key Field Description Array (Qdb_Qdbwhkey)

You can locate the Qdb_Qdbwhkey section with the offset Key_Info_Offset in the Qdb_Qdbwhrec array member. This is a linked list. There is a key field information array member for each key in the record format. The number of key fields is stored in Num_Of_Keys in the Qdb_Qdbwhrec array member.

Offset Bit Type Field Description
Dec Hex
0 0   CHAR(10) Int_Field_ Name Internal key field name. If this is a logical format, this name is the name of the field in the logical format. If this is a physical format, this name is the same as the external field name.
10 A   CHAR(10) Ext_Field_ Name External key field name. If this is a physical format, this is the name of the field in the physical format. If this is a logical format, this name is the name of the field in a physical format on which this format is based.
20 14   BINARY(2) Data_Type The data type of this key field.
22 16   BINARY(2) Field_Len The length of this key field.
24 18   BINARY(2) Num_Of_Digs The number of digits in this key field. For numeric fields, this is the number of digits. For graphic data fields, this is the number of DBCS characters the field can contain. This field is applicable only to numeric and graphic fields.
26 1A   BINARY(2) Dec_Pos The number of decimal positions for this key field.
28 1C 0 CHAR(1) Qdb_ Qdbwhkattr_t Key field attributes flags.
28 1C 0 BIT(1) Descending Descending/ascending sequence indicator.
28 1C 1 BIT(2) Numeric Numeric key field sequencing indicator.
28 1C 3 BIT(1) Reserved Reserved.
28 1C 4 BIT(1) Alt_Collating Alternative collating sequence indicator.
28 1C 5 BIT(1) Force_Zone Force zone sequence indicator.
28 1C 6 BIT(1) Force_Digit Force digit sequence indicator.
28 1C 7 BIT(1) Statement_ Format Key statement external or internal name indicator.
29 1D   BINARY(2) Alt_Name_Len Length of the alternative name. If the length of the alternative name is greater than 30, this field will be 0. The longer alternative name will have to be accessed by the Alias Name Structure (Qdb_Qddfalis).
31 1F   CHAR(30) Alt_Name Alternative name (Alias). If the length of the alternative name is greater than 30, this field will be blank. The longer alternative name will have to be accessed by the Alias Name Structure (Qdb_Qddfalis).
61 3D   CHAR(1) Reserved Reserved.
62 3E 0 CHAR(1) Qdb_ Qdbwhkatt1_t Additional key field attribute flags.
62 3E 0 BIT(1) Null_Value Allow null value (ALNULL) indicator.
62 3E 1 BIT(1) Alt_Name_ Exists The alternative name indicator. If the key field has an alternative name, this field will be 1, even if the length of the alternative name is greater than 30.
62 3E 2 BIT(6) Reserved Reserved.
63 3F   CHAR(1) Reserved Reserved.


FILD0400 Format (Qdb_qdbftrg_head structure)

FILD0400 provides detailed information about triggers defined for a file. FILD0400 Format shows how this information is organized. When more than one entry can appear, the figure indicates this as in (8).

Descriptions of the fields in this structure follow FILD0400 Format. The include source is supplied on the system, in the appropriate language source file, member name QDBRTVFD, in the QSYSINC library. The field names in the following tables apply only to the ILE C include. Refer to Include files and the QSYSINC Library for the names of the OPM and ILE RPG and COBOL includes.

FILD0400 Format

FILD0400 Format



Trigger Information Header (Qdb_Qdbftrg_Head)

This is the first structure and is located at offset zero of the returned data.

Offset Type Field Description
Dec Hex
0 0 BINARY(4) UNSIGNED Qdb_Qdbftrg_Bytes_Returned Length of the data returned in bytes.
4 4 BINARY(4) UNSIGNED Qdb_Qdbftrg_Bytes_Avail Number of bytes available for the trigger information data.
8 8 CHAR(52) Qdb_Qdbftrg_Reserved1 Reserved.
60 3C BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Trgs Number of trigger definitions.
64 40 CHAR(8) Qdb_Qdbftrg_Reserved2 Reserved.
72 48 BINARY(4) UNSIGNED Qdb_Qdbftrg_Off_Ent_Num1 Offset to first trigger definition entry.
76 4C BINARY(4) UNSIGNED Qdb_Qdbftrg_Off_Ins_Grp Offset to the beginning of the insert group.
80 50 BINARY(4) UNSIGNED Qdb_Qdbftrg_Off_Upd_Grp Offset to the beginning of the update group.
84 54 BINARY(4) UNSIGNED Qdb_Qdbftrg_Off_Del_Grp Offset to the beginning of the delete group.
88 58 BINARY(4) UNSIGNED Qdb_Qdbftrg_Off_Read_Grp Offset to the beginning of the read group.
92 5C CHAR(28) Qdb_Qdbftrg_Reserved36 Reserved.
120 78 BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Sql_Trgs Number of SQL triggers.
124 7C BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Ntv_Trgs Number of native triggers.
128 80 BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Insb_Trg Number of INSERT/BEFORE triggers.
132 84 BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Insa_Trg Number of INSERT/AFTER triggers.
136 88 BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Delb_Trg Number of DELETE/BEFORE triggers.
140 8C BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Dela_Trg Number of DELETE/AFTER triggers.
144 90 BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Updb_Trg Number of UPDATE/BEFORE triggers.
148 94 BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Upda_Trg Number of UPDATE/AFTER triggers.
152 98 BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Reada_Trg Number of READ/AFTER triggers.
Start of Change156 9C BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Insi_Trg Number of INSERT/INSTEAD OF triggers.
160 A0 BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Deli_Trg Number of DELETE/INSTEAD OF triggers.
164 A4 BINARY(4) UNSIGNED Qdb_Qdbftrg_Num_Updi_Trg Number of UPDATE/INSTEAD OF triggers.
168 A8 CHAR(536)End of Change Qdb_Qdbftrg_Reserved3 Reserved.


Trigger Definition Entry Header (Qdb_Qdbftrg_Def_Head)

The number of entries is defined by variable Qdb_Qdbftrg_Num_Trgs in the trigger header, Qdb_Qdbftrg_Head. You can locate the Qdb_Qdbftrg_Def_Head section with the offset Qdb_Qdbftrg_Off_Ent_Num1 in the trigger header, Qdb_Qdbftrg_Head.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_Reserved4 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Len Length of the entire trigger definition. This includes all structures. This length added to the pointer to this entry gets you to the next trigger definition entry.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_Head_Len Length of the trigger definition header Qdb_Qdbftrg_Def_Head.
28 1C CHAR(52) Qdb_Qdbftrg_Reserved5 Reserved.
80 50 CHAR(10) Qdb_Qdbftrg_Def_Pgm Trigger program name.
90 5A CHAR(10) Qdb_Qdbftrg_Def_Lib Trigger program library.
100 64 CHAR(4) Qdb_Qdbftrg_Reserved6 Reserved.
104 68 BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Ord_ Num Trigger ordinal number.
108 6C CHAR(1) Qdb_Qdbftrg_Def_State Trigger state.
'E'
Trigger is enabled.
'D'
Trigger is disabled.
109 6D CHAR(1) Qdb_Qdbftrg_Def_Operative Trigger is operative.
'O'
Trigger is operative.
'I'
Trigger is inoperative.
110 6E CHAR(1) Qdb_Qdbftrg_Def_Type Trigger type.
'N'
Native/System (added using ADDPFTRG).
'S'
SQL (added using CREATE TRIGGER).
111 6F CHAR(1) Qdb_Qdbftrg_Def_Mode Trigger mode. Used only when the trigger type QDBFTRG_DEF_TYPE is set to an SQL trigger. The mode is used to determine the I/O model used during the trigger program execution.
'00'X
Not applicable.
'01'X
DB2 SQL.
'02'X
DB2 Row.
112 70 CHAR(1) Qdb_Qdbftrg_Def_Orient Trigger orientation.
'R'
Row trigger
'C'
Column trigger
113 71 CHAR(1) Qdb_Qdbftrg_Def_Time Trigger time.
'1'
After
'2'
Before
Start of Change'3'
Instead OfEnd of Change
114 72 CHAR(1) Qdb_Qdbftrg_Def_Event Trigger event.
'1'
Insert
'2'
Delete
'3'
Update
'4'
Read
115 73 CHAR(45) Qdb_Qdbftrg_Reserved7 Reserved.
160 A0 BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Off_ Trg_Name Offset to the trigger name structure Qdb_Qdbftrg_Name_Area.
164 A4 BINARY(4) UNSIGNED Qdb_Qdbftrg_Reserved8 Reserved.
168 A8 BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Off_Sql_Path Offset to the SQL path structure Qdb_Qdbftrg_Path_Area.
172 AC BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Off_Upd_Cols Offset to the update columns structure Qdb_Qdbftrg_Updc_Area.
176 B0 BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Off_ When_Cols Offset to the structure containing the list of columns referenced in the WHEN condition Qdb_Qdbftrg_When_Area.
180 B4 BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Off_ Body_Cols Offset to the structure containing the list of columns referenced in the trigger body Qdb_Qdbftrg_Body_Area.
184 B8 BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Off_ Dep_Objs Offset to the structure containing the list of dependent objects referenced in the trigger body Qdb_Qdbftrg_Depo_Area.
188 BC BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Off_ Transition Offset to the structure containing the transition tables, Qdb_Qdbftrg_Trns_Area.
192 C0 BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Off_ Trg_Stmt Offset to the structure containing the CREATE TRIGGER statement rQdb_Qdbftrg_Stmt_Area.
196 C4 BINARY(4) UNSIGNED Qdb_Qdbftrg_Def_Off_ Trg_Long Offset to the structure containing the trigger long comment Qdb_Qdbftrg_Long_Area.
200 C8 CHAR(64) Qdb_Qdbftrg_Reserved9 Reserved.
264 108 CHAR(1) Qdb_Qdbftrg_Def_ Updcond Trigger update condition. For system triggers only (Qdb_Qdbftrg_Def_Type = 'N'). This field is valid for the UPDATE event only. This field is ignored for INSERT or DELETE or READ events.
'1'
Always calls the trigger when updating the file.
'2'
Only calls the trigger when the updated values are changed.
265 109 CHAR(1) Qdb_Qdbftrg_Def_ Allow_Repchg Allow repeated change.
X'00'
*NO (Repeated change not allowed)
X'01'
*YES (Repeated change allowed)
266 10A CHAR(1) Qdb_Qdbftrg_Def_ Threadsafe Threadsafe indicator.
X'00'
*UNKNOWN (Threadsafe status is not known)
X'01'
*NO (Not threadsafe)
X'10'
*YES (Threadsafe)
267 10B CHAR(1) Qdb_Qdbftrg_Def_ Multijob Multithreaded job action indicator
X'00'
*SYSVAL (default)
X'01'
*MSG (Run, diagnostic)
X'10'
*NORUN (Escape)
X'11'
*RUN (Run, no message)
268 10C CHAR(1) Qdb_Qdbftrg_Def_Old_Tvar Old correlation variable indicator. Only applies to SQL triggers.
X'00'
No
X'01'
Yes
269 10D CHAR(1) Qdb_Qdbftrg_Def_New_Tvar New correlation variable indicator. Only applies to SQL triggers.
X'00'
No
X'01'
Yes
270 10E CHAR(1) Qdb_Qdbftrg_Def_Old_Ttable Old transition table indicator.
X'00'
No
X'01'
Yes
271 10F CHAR(1) Qdb_Qdbftrg_Def_New_Ttable New transition table indicator
X'00'
No
X'01'
Yes
272 110 CHAR(1) Qdb_Qdbftrg_Def_Self_Ref Self-referencing indicator. Indicates whether or not the user explicitly specified this file's name in the trigger body.
X'00'
Not self-referencing.
X'01'
Self-referencing.
273 111 CHAR(13) Qdb_Qdbftrg_Def_Crt_Ts Trigger creation timestamp. The format is CYYMMDDHHMMSS.
286 11E CHAR(10) Qdb_Qdbftrg_Def_Crt_User User profile that created the trigger.
296 11F CHAR(10) Qdb_Qdbftrg_Def_Pgm_Owner User profile that owns the trigger program. For SQL triggers only.
306 132 BIN(4) UNSIGNED Qdb_Qdbftrg_Def_Trg_Ccsid CCSID of the CREATE TRIGGER statement.
310 136 CHAR(1) Qdb_Qdbftrg_Reserved34 Reserved.
311 137 CHAR(1) Qdb_Qdbftrg_Def_Mod_Tvar The trigger contains a SET statement that modifies the new correlation variable. (Indicates whether or not update authority is required to the table.) For SQL *BEFORE *UPDATE triggers only.
X'00'
No.
X'01'
Yes.
312 138 CHAR(152) Qdb_Qdbftrg_Reserved10 Reserved.


Trigger Definition Name Structure (Qdb_Qdbftrg_Name_Area)

You can locate the Qdb_Qdbftrg_Name_Area section with the offset Qdb_Qdbftrg_Def_Off_Trg_Name in the Qdb_Qdbftrg_Def_Head section.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_Reserved11 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_Name_ Area_Tot_Len Total length of the trigger name area Qdb_Qdbftrg_Name_Area.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_Name_Lib_Len Length of the trigger library name.
28 1C BINARY(4) UNSIGNED Qdb_Qdbftrg_Name_Len Length of the trigger program name.
32 20 CHAR(1) Qdb_Qdbftrg_Name_Sysgen System-generated trigger name indicator.
X'00'
The user specified the trigger name.
X'01'
Originally, the user generated the name, but a name collision occurred and the system generated a new name.
X'02'
The system generated the trigger name.
33 21 CHAR(1) Qdb_Qdbftrg_Name_Delim Delimited name indicator. If the trigger name is delimited, it will contain double quotes.
X'00'
The trigger name is not delimited.
X'01'
The trigger name is delimited.
34 22 CHAR(1) Qdb_Qdbftrg_Lib_Delim Delimited library name indicator. If the trigger library name is delimited, it will contain double quotes.
X'00'
The trigger library name is not delimited.
X'01'
The trigger library name is delimited.
35 23 CHAR(1) Qdb_Qdbftrg_Name_Type Trigger naming convention.
X'00'
System naming.
X'01'
SQL naming.
36 24 CHAR(58) Qdb_Qdbftrg_Reserved12 Reserved.
94 5E CHAR(268) Qdb_Qdbftrg_Name_Qual Qualified trigger name. The trigger name and library name are in two parts. Part 1 is the trigger library name, which is padded to 10 characters, if necessary, with blanks. Qdb_Qdbftrg_Name_Lib_Len defines the length of the trigger library name. Part 2 is the trigger name. Qdb_Qdbftrg_Name_Len defines the length of the trigger name.


SQL Path Structure (Qdb_Qdbftrg_Path_Area)

You can locate the Qdb_Qdbftrg_Path_Area section with the offset Qdb_Qdbftrg_Def_Off_Sql_Path in the Qdb_Qdbftrg_Def_Head section. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_Reserved13 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_Path_Tot_Len Total length of the SQL path area Qdb_Qdbftrg_Path_Area.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_Path_Len Length of the SQL path structure Qdb_Qdbftrg_Path.
28 1C CHAR(36) Qdb_Qdbftrg_Reserved14 Reserved.
64 40 CHAR(*) Qdb_Qdbftrg_Path SQL path. See DB2 UDB for iSeries SQL Reference CURRENT PATH special register for information on the format of this structure.


UPDATE Columns Structure (Qdb_Qdbftrg_Updc_Area)

You can locate the Qdb_Qdbftrg_Updc_Area section with the offset Qdb_Qdbftrg_Def_Off_Upd_Col in the Qdb_Qdbftrg_Def_Head section. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_Reserved15 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_Updc_Tot_Len Total length of the update columns area Qdb_Qdbftrg_Updc_Area.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_Updc_Num_Cols Number of columns in the list Qdb_Qdbftrg_Updc_List_Struc.
28 1C CHAR(52) Qdb_Qdbftrg_Reserved16 Reserved.
80 50 CHAR(*) Qdb_Qdbftrg_Updc_List_Struc Update column list structure.


UPDATE Columns Entry Structure (Qdb_Qdbftrg_Updc_List_Ent)

The Qdb_Qdbftrg_Updc_List_Ent section maps an entry in the structure Qdb_Qdbftrg_Updc_List_Struc.

Offset Type Field Description
Dec Hex
0 0 BINARY(4) UNSIGNED Qdb_Qdbftrg_Updc_Le_Len Update column list entry length. Addressability to this entry plus Qdb_Qdbftrg_Updc_Le_Len gets addressability to the next entry in this structure.
4 4 CHAR(10) Qdb_Qdbftrg_Updc_Le_ Short_Name Short name of the column.
14 E CHAR(1) Qdb_Qdbftrg_Updc_Le_ Short_Del Short name is delimited indicator.
X'00'
Name is not delimited.
X'01'
Name is delimited.
15 F CHAR(1) Qdb_Qdbftrg_Updc_Le_ Long_Del Long name is delimited indicator.
X'00'
Name is not delimited.
X'01'
Name is delimited.
16 10 CHAR(1) Qdb_Qdbftrg_Updc_Le_ Long_Same Short name and long name are the same indicator.
X'00'
Names are different.
X'01'
Names are the same.
17 11 BINARY(4) UNSIGNED Qdb_Qdbftrg_Updc_Le_ Long_Len Length of the long name Qdb_Qdbftrg_Updc_Le_Long_Name.
21 15 CHAR(27) Qdb_Qdbftrg_Reserved17 Reserved.
48 30 CHAR(*) Qdb_Qdbftrg_Updc_Le_ Long_Name Long name of the column.


WHEN Columns Structure (Qdb_Qdbftrg_When_Area)

You can locate the Qdb_Qdbftrg_When_Area section with the offset Qdb_Qdbftrg_Def_Off_When_Cols in the Qdb_Qdbftrg_Def_Head section. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_Reserved18 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_When_Tot_Len Total length of the WHEN columns area Qdb_Qdbftrg_When_Area.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_When_Num_Cols Number of columns in the list Qdb_Qdbftrg_When_List_Struc.
28 1C CHAR(1) Qdb_Qdbftrg_When_Self_Ref Whether columns in the WHEN list belong to this file.
X'00'
All columns belong to the ON table.
X'01'
Some of the columns belong to the ON table.
X'02'
None of the columns belong to the ON table.
29 1D CHAR(51) Qdb_Qdbftrg_Reserved19 Reserved.
80 50
Qdb_Qdbftrg_When_Array WHEN column array.


WHEN Columns Entry Structure (Qdb_Qdbftrg_When_Array)

This Qdb_Qdbftrg_When_Array section maps an entry in the structure Qdb_Qdbftrg_When_Array. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 BINARY(4) UNSIGNED Qdb_Qdbftrg_When_Col_Off WHEN column name offset into the WHEN portion of the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg .
4 4 BINARY(4) UNSIGNED Qdb_Qdbftrg_When_Col_Len Length of the column name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg .
8 8 BINARY(4) UNSIGNED Qdb_Qdbftrg_When_File_Off Offset to the column's file name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg relative to the start of the CREATE TRIGGER statement.
12 C BINARY(4) UNSIGNED Qdb_Qdbftrg_When_File_Len Length of the column's file name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg .
16 10 BINARY(4) UNSIGNED Qdb_Qdbftrg_When_Lib_Off Offset to the column's library name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg relative to the start of the CREATE TRIGGER statement.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_When_Lib_Len Length of the column's library name in the trigger string Qdb_Qdbftrg_Stmt_Crt_Trg .
24 18 CHAR(1) Qdb_Qdbftrg_When_1st_Entry Whether the column name is the first in the list of entries.
X'00'
Column is not the first in the list.
X'01'
Column name is the first in the list.
25 19 CHAR(1) Qdb_Qdbftrg_When_This_File Whether the column name is in this file.
X'00'
Column is not in this file.
X'01'
Column name is in this file.
26 1A CHAR(1) Qdb_Qdbftrg_When_Col_Long Whether the column name is a short or long name.
X'00'
Column name is short name.
X'01'
Column name is long name.
27 1B CHAR(1) Qdb_Qdbftrg_When_Col_Del Whether the column name is a delimited name.
X'00'
Column name is is not delimited.
X'01'
Column name is delimited.
28 1C CHAR(1) Qdb_Qdbftrg_When_File_Long Whether the column's file name is a short or long name.
X'00'
File name is short name.
X'01'
File name is long name.
29 1D CHAR(1) Qdb_Qdbftrg_When_File_Del Whether the column's file name is a delimited name.
X'00'
File name is not delimited.
X'01'
File name is delimited.
30 1E CHAR(1) Qdb_Qdbftrg_When_Lib_Long Whether the column's library name is a short or long name.
X'00'
Library name is short name.
X'01'
Library name is long name.
31 1F CHAR(1) Qdb_Qdbftrg_When_Lib_Del Whether the column's library name is a delimited name.
X'00'
Columns name is not delimited.
X'01'
Column name is delimited.
32 20 CHAR(32) Qdb_Qdbftrg_Reserved20 Reserved.


BODY Columns Structure (Qdb_Qdbftrg_Body_Area)

You can locate this Qdb_Qdbftrg_Body_Area section with the offset Qdb_Qdbftrg_Def_Off_Body_Cols in the Qdb_Qdbftrg_Def_Head section. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_Reserved21 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_Body_Tot_Len Total length of the BODY columns area Qdb_Qdbftrg_Body_Area.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_Body_Num_Cols Number of columns in the list Qdb_Qdbftrg_Body_List_Struc.
28 1C CHAR(1) Qdb_Qdbftrg_Body_Self_Ref Whether columns in the body list belong to this file.
X'00'
All self-referencing.
X'01'
Some self-referencing.
X'10'
Not self-referencing.
29 1D CHAR(51) Qdb_Qdbftrg_Reserved22 Reserved.
80 50
Qdb_Qdbftrg_Body_Array Array used to access the list of BODY referenced columns.


BODY Columns Entry Structure (Qdb_Qdbftrg_Body_Array)

The Qdb_Qdbftrg_Body_Array section maps an entry in the structure Qdb_Qdbftrg_Body_Array. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 BINARY(4) UNSIGNED Qdb_Qdbftrg_Body_Col_Off BODY column name offset into the BODY portion of the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg.
4 4 BINARY(4) UNSIGNED Qdb_Qdbftrg_Body_Col_Len Length of the column name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg .
8 8 BINARY(4) UNSIGNED Qdb_Qdbftrg_Body_File_Off Offset to the column's file name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg relative to the start of the CREATE TRIGGER statement.
12 C BINARY(4) UNSIGNED Qdb_Qdbftrg_Body_File_Len Length of the column's file name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg .
16 10 BINARY(4) UNSIGNED Qdb_Qdbftrg_Body_Lib_Off Offset to the column's library name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg relative to the start of the CREATE TRIGGER statement.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_Body_Lib_Len Length of the column's library name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg .
24 18 CHAR(1) Qdb_Qdbftrg_Body_1st_Entry Whether the column name is the first in the list of entries.
X'00'
Column is not first in the list.
X'01'
Column name is first in the list.
25 19 CHAR(1) Qdb_Qdbftrg_Body_This_File Whether the column name is in this file.
X'00'
Column is not in this file.
X'01'
Column name is in this file.
26 1A CHAR(1) Qdb_Qdbftrg_Body_Col_Long Whether the column name is a short or long name.
X'00'
Column name is short name.
X'01'
Column name is long name.
27 1B CHAR(1) Qdb_Qdbftrg_Body_Col_Del Whether the column name is a delimited name.
X'00'
Column name is is not delimited.
X'01'
Column name is delimited.
28 1C CHAR(1) Qdb_Qdbftrg_Body_File_Long Whether the column's file name is a short or long name.
X'00'
File name is short name.
X'01'
File name is long name.
29 1D CHAR(1) Qdb_Qdbftrg_Body_File_Del Whether the column's file name is a delimited name.
X'00'
File name is not delimited.
X'01'
File name is delimited.
30 1E CHAR(1) Qdb_Qdbftrg_Body_Lib_Long Whether the column's library name is a short or long name.
X'00'
Library name is short name.
X'01'
Library name is long name.
31 1F CHAR(1) Qdb_Qdbftrg_Body_Lib_Del Whether the column's library name is a delimited name.
X'00'
Columns name is not delimited.
X'01'
Column name is delimited.
32 20 CHAR(32) Qdb_Qdbftrg_Reserved23 Reserved.


Dependent Objects Structure (Qdb_Qdbftrg_Depo_Area)

You can locate the Qdb_Qdbftrg_Depo_Area section with the offset Qdb_Qdbftrg_Def_Off_Dep_Objs in the Qdb_Qdbftrg_Def_Head section. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_ Reserved24 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_ Depo_Tot_Len Total length of the dependent objects area Qdb_Qdbftrg_Depo_Area.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_ Depo_Num_Off Number of dependent object offsets in Qdb_Qdbftrg_Depo_Array. These are offsets into the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg that will position you to a dependent object of the type Qdb_Qdbftrg_Depo_Type.
28 1C CHAR(1) Qdb_Qdbftrg_ Depo_Self_Ref Whether this file is referenced at least once somewhere in the WHEN or BODY. This is a self-referencing dependency.
X'00'
Not self-referencing.
X'01'
Is self-referencing.
29 1D CHAR(51) Qdb_Qdbftrg_ Reserved25 Reserved.
80 50
Qdb_Qdbftrg_ Depo_Array Update column list structure.


Dependent Objects Entry Structure (Qdb_Qdbftrg_Depo_Array)

The Qdb_Qdbftrg_Depo_Array section maps an entry in the structure Qdb_Qdbftrg_Depo_Array. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 CHAR(2) Qdb_Qdbftrg_Depo_ Type Type of dependent object.
'TB'
Table
'PF'
Physical File
'VW'
View
'LF'
Logical File
'IX'
Index
'UF'
User Defined Function
'UT'
User Defined Type
'PR'
Procedure
'AL'
Alias
2 2 BINARY(4) UNSIGNED Qdb_Qdbftrg_Depo_ Off Offset to the dependent object relative to the beginning of the CREATE TRIGGER string Qdb_Qdbftrg_Stmt_Crt_Trg .
6 6 BINARY(4) UNSIGNED Qdb_Qdbftrg_Depo_ Len Length of the dependent object in the CREATE TRIGGER string Qdb_Qdbftrg_Stmt_Crt_Trg .
10 A BINARY(4) UNSIGNED Qdb_Qdbftrg_Depo_ Lib_Off Offset to the qualifying library name of the dependent object. Offset relative from the start of Qdb_Qdbftrg_Stmt_Crt_Trg . A length of 0 indicates no qualifying library.
14 E BINARY(4) UNSIGNED Qdb_Qdbftrg_Depo_ Lib_Len Length of the qualifying library name of the dependent object. A length of 0 indicates there is no qualifying library.
18 12 CHAR(1) Qdb_Qdbftrg_Depo_ 1st_Entry Whether the object name is the first in the list of entries. Criteria is based on object name, library name, and object type.
X'00'
Object is 2nd or greater occurance in the list.
X'01'
Object is the first in the list.
19 13 CHAR(1) Qdb_Qdbftrg_Depo_ This_File Whether the object is this file.
X'00'
Object is not this file.
X'01'
Object name is this file.
20 14 CHAR(1) Qdb_Qdbftrg_Depo_ Obj_Long Whether the object name is is a short or long name.
X'00'
Object name is short name.
X'01'
Object name is long name.
21 15 CHAR(1) Qdb_Qdbftrg_Depo_ Obj_Del Whether the object name is a delimited name.
X'00'
Object name is is not delimited.
X'01'
Object name is delimited.
22 16 CHAR(1) Qdb_Qdbftrg_Depo_ Lib_Long Whether the library's name is a short or long name.
X'00'
Library name is short name.
X'01'
Library name is long name.
23 17 CHAR(1) Qdb_Qdbftrg_Depo_ Lib_Del Whether the library's name is a delimited name.
X'00'
Library name is not delimited.
X'01'
Library name is delimited.
24 18 CHAR(40) Qdb_Qdbftrg_ Reserved26 Reserved.


Transition Area Structure (Qdb_Qdbftrg_Trns_Area)

You can locate the Qdb_Qdbftrg_Trns_Area section with the offset Qdb_Qdbftrg_Def_Off_Transition in the Qdb_Qdbftrg_Def_Head section. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_Reserved27 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Tot_Len Total length of the transition area Qdb_Qdbftrg_Trns_Area.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Oldvar_Len Old correlation variable name length.
28 1C BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Newvar_Len New correlation variable name length.
32 20 BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Oldtbl_Len Old transition table name length.
36 24 BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Newtbl_Len New transition table name length.
40 28 BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Oldvar_Off Old correlation variable name offset.
44 2C BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Newvar_Off New correlation variable name offset.
48 30 BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Oldtbl_Off Old transition table name offset.
52 34 BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Newtbl_Off New transition table name offset.
56 38 CHAR(1) Qdb_Qdbftrg_Trns_Oldvar_Del Whether the old correlation variable name is delimited.
X'00'
Name is not delimited.
X'01'
Name is delimited.
57 39 CHAR(1) Qdb_Qdbftrg_Trns_Newvar_Del Whether the new correlation variable name is delimited.
X'00'
Name is not delimited.
X'01'
Name is delimited.
58 3A CHAR(1) Qdb_Qdbftrg_Trns_Oldtbl_Del Whether the old table name is delimited.
X'00'
Name is not delimited.
X'01'
Name is delimited.
59 3B CHAR(1) Qdb_Qdbftrg_Trns_Newtbl_Del Whether the new table name is delmited.
X'00'
Name is not delimited.
X'01'
Name is delimited.
60 3C BINARY(4) UNSIGNED Qdb_Qdbftrg_Trns_Names_Len Length of the transition names Qdb_Qdbftrg_Trns_Names.
64 40 CHAR(48) Qdb_Qdbftrg_Reserved28 Reserved.
112 70 CHAR(*) Qdb_Qdbftrg_Trns_Names Old/new transition variable/table names.


Trigger Statement Area (Qdb_Qdbftrg_Stmt_Area)

You can locate the Qdb_Qdbftrg_Stmt_Area section with the offset Qdb_Qdbftrg_Def_Off_Trg_Stmt in the Qdb_Qdbftrg_Def_Head section. This structure is for SQL triggers only.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_Reserved29 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_Stmt_Tot_Len Total length of the statement area.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_Stmt_Onfile_Off Offset to the user-specified file table name in the CREATE TRIGGER statement Qdb_Qdbftrg_Stmt_Crt_Trg .
28 1C BINARY(4) UNSIGNED Qdb_Qdbftrg_Stmt_Onfile_Len Length of the qualified library file name of the ON file/TABLE name, including the period, in Qdb_Qdbftrg_Stmt_Crt_Trg .
32 20 CHAR(1) Qdb_Qdbftrg_Stmt_Onfile_Del Whether the ON table/file name is delimited.
X'00'
Name is not delimited.
X'01'
Name is delimited.
33 21 CHAR(1) Qdb_Qdbftrg_Stmt_Onlib_Del Whether the ON library name is delimited.
X'00'
Name is not delimited.
X'01'
Name is delimited.
34 22 CHAR(1) Qdb_Qdbftrg_Stmt_Onfile_Long Whether the ON table/file name is a long name.
X'00'
Name is not a long name.
X'01'
Name is a long name.
35 23 CHAR(1) Qdb_Qdbftrg_Reserved30 Reserved.
36 24 BINARY(4) UNSIGNED Qdb_Qdbftrg_Stmt_Crt_Trg_Len Length of the SQL CREATE TRIGGER string in variable Qdb_Qdbftrg_Stmt_Crt_Trg .
40 28 BINARY(4) UNSIGNED Qdb_Qdbftrg_Stmt_When_Len Length of the WHEN clause for the SQL CREATE TRIGGER string in variable Qdb_Qdbftrg_Crt_Trg.
44 2C BINARY(4) UNSIGNED Qdb_Qdbftrg_Stmt_When_Off Offset to the WHEN clause of the SQL CREATE TRIGGER string in variable Qdb_Qdbftrg_Stmt_Crt_Trg .
48 30 BINARY(4) UNSIGNED Qdb_Qdbftrg_Stmt_Body_Len Length of the BODY portion of the SQL CREATE TRIGGER string in variable Qdb_Qdbftrg_Stmt_Crt_Trg.
52 34 BINARY(4) UNSIGNED Qdb_Qdbftrg_Stmt_Body_Off Offset to the BODY portion of the SQL CREATE TRIGGER string in variable Qdb_Qdbftrg_Stmt_Crt_Trg.
56 38 CHAR(56) Qdb_Qdbftrg_Reserved31 Reserved.
112 70 CHAR(*) Qdb_Qdbftrg_Stmt_Crt_Trg SQL CREATE TRIGGER string.


Trigger Long Comment Area (Qdb_Qdbftrg_Long_Area)

You can locate the Qdb_Qdbftrg_Long_Area section with the offset Qdb_Qdbftrg_Def_Off_Trg_Long in the Qdb_Qdbftrg_Def_Head section.

Offset Type Field Description
Dec Hex
0 0 CHAR(20) Qdb_Qdbftrg_Reserved32 Reserved.
20 14 BINARY(4) UNSIGNED Qdb_Qdbftrg_Long_Tot_Len Total length of the long comment area Qdb_Qdbftrg_Long_Area.
24 18 BINARY(4) UNSIGNED Qdb_Qdbftrg_Long_Len Length of the trigger long comment that is located in variable Qdb_Qdbftrg_Long_Comment.
28 1C BINARY(2) UNSIGNED Qdb_Qdbftrg_Long_Ccsid CCSID of the long comment in Qdb_Qdbftrg_Long_Comment.
30 1E CHAR(34) Qdb_Qdbftrg_Reserved33 Reserved.
64 40 CHAR(*) Qdb_Qdbftrg_Long_Comment Trigger long comment.


Usage Notes

In multithreaded jobs, this API is not threadsafe and fails for distributed data management (DDM) files of type *SNA.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3CF1 E Error code parameter is not valid.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C21 E Format name &1 is not valid.
CPF3C22 E Cannot get information about file &1.
CPF3C23 E Object &1 is not a database file.
CPF3C24 E Length of the receiver variable is not valid.
CPF3C25 E Value &1 for file override parameter is not valid.
CPF3C90 E Literal value cannot be changed.
CPF3021 E File &1 not allowed with SYSTEM(*RMT).
CPF3025 E File &1 not allowed with SYSTEM(*LCL).
CPF325F E Conversion of the text failed.
CPF327A E Value &1 for format type parameter is not valid.
CPF3270 E Keyed file operation not allowed for file &1.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


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