!*** MODULE $XABKEYDEF *** !DEC$ OPTIONS/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)/NOWARN ! ! key definition xab field definitions ! $xabkeydef ! PARAMETER XAB$C_KEY = '00000015'X ! xabkey id code PARAMETER XAB$M_DUP = '00000001'X PARAMETER XAB$M_CHG = '00000002'X PARAMETER XAB$M_NUL = '00000004'X PARAMETER XAB$M_IDX_NCMPR = '00000008'X PARAMETER XAB$M_KEY_NCMPR = '00000040'X PARAMETER XAB$M_DAT_NCMPR = '00000080'X PARAMETER XAB$C_STG = '00000000'X ! string PARAMETER XAB$C_IN2 = '00000001'X ! signed 15 bit integer (2 bytes) PARAMETER XAB$C_BN2 = '00000002'X ! 2 byte binary PARAMETER XAB$C_IN4 = '00000003'X ! signed 31 bit integer (4 bytes) PARAMETER XAB$C_BN4 = '00000004'X ! 4 byte binary PARAMETER XAB$C_PAC = '00000005'X ! packed decimal (1-16 bytes) PARAMETER XAB$C_IN8 = '00000006'X ! signed 63 bit integer (4 bytes) PARAMETER XAB$C_BN8 = '00000007'X ! 8 byte binary PARAMETER XAB$C_COL = '00000008'X ! collated PARAMETER XAB$C_MAX_ASCEND = '00000008'X ! maximum ascending type PARAMETER XAB$C_DSTG = '00000020'X ! descending string PARAMETER XAB$C_DIN2 = '00000021'X ! " signed word PARAMETER XAB$C_DBN2 = '00000022'X ! " unsigned word PARAMETER XAB$C_DIN4 = '00000023'X ! " signed longword PARAMETER XAB$C_DBN4 = '00000024'X ! " unsigned longword PARAMETER XAB$C_DPAC = '00000025'X ! " packed decimal PARAMETER XAB$C_DIN8 = '00000026'X ! " signed quadword PARAMETER XAB$C_DBN8 = '00000027'X ! " unsigned quadword PARAMETER XAB$C_DCOL = '00000028'X ! " collated PARAMETER XAB$C_MAXDTP = '00000028'X ! max. legal data type PARAMETER XAB$K_KEYLEN_V2 = '00000040'X ! old xabkey length PARAMETER XAB$C_KEYLEN_V2 = '00000040'X ! old xabkey length ! PARAMETER XAB$C_PRG3 = '00000003'X ! Prologue version three PARAMETER XAB$C_PRG2 = '00000002'X ! Prologue version two PARAMETER XAB$C_PRG1 = '00000001'X ! Prologue versoin one PARAMETER XAB$K_KEYLEN_V4 = '0000004C'X ! xabkey length until V5 PARAMETER XAB$C_KEYLEN_V4 = '0000004C'X ! xabkey length until V5 STRUCTURE /XABKEYDEF/ BYTE %FILL BYTE %FILL INTEGER*2 %FILL INTEGER*4 %FILL ! HAS SAME COD, BLN, SPARE AND NXT FIELD ! THESE 4 FIELDS ARE COMMON TO ALL XABS AND ! HAVE BEEN DEFINED BY $XABDEF ! ! the field layout of the key xab is such that it matchs as ! closely as possible the layout of a key decriptor in the ! index file prologue. this is so the contents may be moved ! between the two structures as efficiently as possible. ! BYTE XAB$B_IAN ! index level area number BYTE XAB$B_LAN ! lowest index level area number BYTE XAB$B_DAN ! data level area number BYTE XAB$B_LVL ! level of root bucket BYTE XAB$B_IBS ! size of index buckets in virtual blocks BYTE XAB$B_DBS ! size of data buckets in virtual blocks INTEGER*4 XAB$L_RVB ! root bucket start vbn UNION MAP BYTE XAB$B_FLG ! key option flags END MAP MAP PARAMETER XAB$S_DUP = 1 PARAMETER XAB$V_DUP = 0 ! duplicate key values allowed PARAMETER XAB$S_CHG = 1 PARAMETER XAB$V_CHG = 1 ! alt key only --key field may change on update PARAMETER XAB$S_NUL = 1 PARAMETER XAB$V_NUL = 2 ! alt key only --null key value enable PARAMETER XAB$S_IDX_NCMPR = 1 PARAMETER XAB$V_IDX_NCMPR = 3 ! indicate index records for given key are not compres PARAMETER XAB$S_KEY_NCMPR = 1 PARAMETER XAB$V_KEY_NCMPR = 6 ! indicates key is not compressed in data record BYTE %FILL (1) END MAP MAP PARAMETER XAB$S_DAT_NCMPR = 1 PARAMETER XAB$V_DAT_NCMPR = 7 BYTE %FILL (1) ! data record is not compressed END MAP END UNION BYTE XAB$B_DTP ! key field data type BYTE XAB$B_NSG ! number of key segments BYTE XAB$B_NUL ! nul key character BYTE XAB$B_TKS ! total key field size (bytes) BYTE XAB$B_REF ! key of reference (0=prim key, ! 1-254 = alternate keys) INTEGER*2 XAB$W_MRL ! minimun record length to contain key field INTEGER*2 XAB$W_IFL ! index bucket fill size (bytes) INTEGER*2 XAB$W_DFL ! data bucket fil size (bytes) UNION MAP INTEGER*2 XAB$W_POS(1:8) ! key field record offset positions END MAP MAP INTEGER*2 XAB$W_POS0 ! segment 0 INTEGER*2 XAB$W_POS1 ! segment 1 INTEGER*2 XAB$W_POS2 ! segment 2 INTEGER*2 XAB$W_POS3 ! segment 3 INTEGER*2 XAB$W_POS4 ! segment 4 INTEGER*2 XAB$W_POS5 ! segment 5 INTEGER*2 XAB$W_POS6 ! segment 6 INTEGER*2 XAB$W_POS7 ! segment 7 END MAP END UNION UNION MAP BYTE XAB$B_SIZ(1:8) ! key field segment sizes END MAP MAP BYTE XAB$B_SIZ0 ! segment 0 BYTE XAB$B_SIZ1 ! segment 1 BYTE XAB$B_SIZ2 ! segment 2 BYTE XAB$B_SIZ3 ! segment 3 BYTE XAB$B_SIZ4 ! segment 4 BYTE XAB$B_SIZ5 ! segment 5 BYTE XAB$B_SIZ6 ! segment 6 BYTE XAB$B_SIZ7 ! segment 7 END MAP END UNION INTEGER*2 %FILL ! spare ! ! the positions of the above fields are dictated by the key descriptor ! record layout in the index file prologue. ! INTEGER*4 XAB$L_KNM ! pointer to 32 character key name buffer INTEGER*4 XAB$L_DVB ! first data bucket start vbn ! Additions for prologue 3 files ! UNION MAP BYTE XAB$B_TYP(1:8) ! key field segment types END MAP MAP BYTE XAB$B_TYP0 ! segment 0 BYTE XAB$B_TYP1 ! segment 1 BYTE XAB$B_TYP2 ! segment 2 BYTE XAB$B_TYP3 ! segment 3 BYTE XAB$B_TYP4 ! segment 4 BYTE XAB$B_TYP5 ! segment 5 BYTE XAB$B_TYP6 ! segment 6 BYTE XAB$B_TYP7 ! segment 7 END MAP END UNION BYTE XAB$B_PROLOG ! indicate prologue version desired (primary key only) BYTE %FILL ! spare INTEGER*2 %FILL ! spare INTEGER*4 XAB$L_COLTBL ! address of collate table INTEGER*4 XAB$L_COLSIZ ! size of collate table INTEGER*4 XAB$L_COLNAM ! name of collate table INTEGER*4 %FILL ! spare INTEGER*4 %FILL ! spare INTEGER*4 %FILL ! spare ! -- ! ++ END STRUCTURE ! XABKEYDEF ! basealign on aggregate XABKEYDEF operates after aggregate end PARAMETER XAB$K_KEYLEN = '00000064'X ! xabkey length for V5 PARAMETER XAB$C_KEYLEN = '00000064'X ! xabkey length for V5 !DEC$ END OPTIONS