We are having a problem creating a DDF file from Btrieva using the Clarion sync tool. When creating an index, in some cases, the order of the fields in the DDF index differs from the original order in the DCT. The problem seems to be when there are more than 2 fields in the index. Example:
Index TRF30K2 in DDF is described as: TRT3003 + TRT3001 + TRT3002.
In Dictionary and in Btrieve physical file is: TRT3003 + TRT3002 + TRT3001.
Hi,
Seems a bug, you could generate a PTSS report about it.
For reference, which Clarion and engine versions have you used?
Which versions did you choose in this screen?
On the other hand, here there is a tool https://www.icetips.com/downloads.php?dl=PAR2
2001-02-01 CLA to DDF converter (v1.1) Utility - P.T. Ong 897,758 Cla2DDF.exe
Perhaps you could try it and compare results produced.
Thank you for your reply. We are using Clarion 10 Build 11975, but we also tried with Clarion 11 Build 13744. The result is the same. When we create a DDF in an empty folder, we get a screen with the parameters from your email. All parameters are set by default. In this case, a DDF with an error is created (Xf$Flags missing in X$File)
If we do the conversion to an existing empty DDF, then the screen with the specified parameters does not appear. In this case, the file X$file was created correctly, with all fields, but the indexes are wrong.
The mentioned conversion program works only in a 32-bit environment, so, unfortunately, it is of no use to us.
I think it would be usesful including technical details on the PTSS. For example it would be helpful listing the differences of how the DDF contents is generated vs how it should be (your mentioned “empty” DDF:assumning it includes those 3 system files).
The problem is the contents that Clarion synchronizer populates into them, both for system (fixed data) and user files.
Problems detected on FIELD.DDF
-It omits a ROW: Try as a workaround manually inserting it:
Xe$Id = 4
Xe$File = 1
Xe$Name = ‘Xf$Flags’
Xe$DataType = 1
Xe$Offset = 86
Xe$Size = 1
Xe$Dec = 0
Xe$Flags = 0
Problems detected on FILE.DDF
-It doesn’t set the Xf$Flags for the 3 system files to 16 (bit 3 (4th) on)
(try manually setting it once done the FIELD’s workaround)
-Problems detected on INDEX.DDF
-Incorrect number in a column (Xi$Field) in seven out of eight rows related to indexes components of FIELD.DDF file (quite confusing words usage because of the mix of data and meta-data): Current values:6 7 8 7 8 7 10 Expected are the previous of those (one less). The other row which as an 11 is ok.
-Flags-Modifiable:Some discrepancies on how the file indexes are created (by looking at BUTIL -STAT on the file) and the flags set on its DDF defition. Eg. index 0 of FILE.DDF has shows as Modifiable while its corresponding bit on INDEX.DDF is off. On index 1 they both match. Different on indexes 0 and 1 of FIELD.DDF, matches on indexes 2,3,4. And different on index 0 and 1 of INDEX.DDF and matches on 2.
-Flags-Supplemental: Clarion Synchonizer toggles bit 10 (11th) (=1024 decimal) for Keys defined for Clarion Btrieve .DAT files, I couldn’t find documentation of that bit (eg. https://docs.actian.com/psql/psqlv13/index.html#page/sqlref/sqlsystb.htm#ww125161 ) probably it wanted the bit 7 =128 decimal ?
-Flags-AnotherSegment: This bit should be 0 for the last segment of a multipart (or singlepart) key, and 1 for the previous parts. Clarion Synchonizer toggles this bit incorrectly on keys definition of User files with 3 (or more?) parts. It toggles on only for the first segment and not for the second (an onwards?only testes with 3 component keys)
-Xi$Part field on keys definition of User files with 3 (or more?) parts: it alters the defined order of fields after the first segment. Not tested with more than 3 components. This is the problem mentioned in this thread. (Try manually editing as a workaround-have you already done?).
You may find it easier to use a template that reads the DCT file and writes out an SQL script and then run that through the PCC SQL interface. In this case you would want to use the “IN DICTIONARY” option on the DROP TABLE and CREATE TABLE statements. We use our own tool but any template that will create an SQL script could probably be used. Here is a simple example:
– DDS SQL Generation for Clarion
– (C) Copyright Distributed Data Services, Inc. 2003 - 2023
DROP TABLE IF EXISTS “BillingReportBatch” IN DICTIONARY#
CREATE TABLE “BillingReportBatch” IN DICTIONARY USING ‘BillingReportBatch.mkd’
(
“Batch” INTEGER NOT NULL,
“CreateDate” DATE NOT NULL,
“CreateTime” TIME NOT NULL,
“ChangeDate” DATE NOT NULL,
“ChangeTime” TIME NOT NULL,
“InvoiceYear” SMALLINT NOT NULL,
“InvoiceMonth” UTINYINT NOT NULL,
“Payer” INTEGER NOT NULL,
“Partners” INTEGER NOT NULL,
“Records” INTEGER NOT NULL,
“Miles” INTEGER NOT NULL,
“ExpenseRecords” INTEGER NOT NULL,
“ExceptionRecords” INTEGER NOT NULL,
PRIMARY KEY
(
“Batch”
)
)#