Hi DAW
Definitely serious issues with Table finds in DB2_DRV A2
EPOCH Date Fails
Following Test generates a "CLI0112E Error in assignment. SQLSTATE=22005 sqlstate = 22005" error
Notice the 2 digit year used in the date constrain - this is an EPOCH date test (failed)
Code:
Constraint_Set Tran.File_Number Clear
Constrain Tran Relates to Acc
Constrain Tran.Date Eq "29/07/99"
Constrained_Find First Tran by Index.1
Relate Find clears Parent records
Now the same, test using a 4-digit year finds the first record of TRAN BUT then clears the parent ACC table !?
Code:
Constraint_Set Tran.File_Number Clear
Constrain Tran Relates to Acc
Constrain Tran.Date Eq "29/07/1999"
Constrained_Find First Tran by Index.1
Testing GE finds - FAILS
- Find a record (eq) using index.1 then GE using another index - because the buffer is populated via the first find eq, a subsequent GE using another index should find the same record - its doesn't
Code:
Clear Cust
Move 120047 to Cust.Cust#
Find Eq Cust by Index.1 // CUST#
If (Found) Begin
Find Ge Cust by Index.2 // SURNAME,INITIALS,FIRST_NAME,CUST#
If (Found) Send AppendRTFLn (SFormat("2Found: %1 <tab> %2 <tab> %3 <tab> %4",trim(Cust.Surname), trim(Cust.Initials), trim(Cust.First_Name), Cust.Cust#))
End
Testing GT finds with Alias table - FAILS
- Find a record, then perform a GT find using the same index - because the buffer is populated via the first find, a subsequent GT should find the next record - its doesn't it find the same record
Code:
Clear Cust
Move 120047 to Cust.Cust#
Find Eq Cust by Index.1 // CUST#
If (Found) Begin
Clear Cust2
Move Cust.Surname to Cust2.Surname
Move Cust.Initials to Cust2.Initials
Move Cust.First_Name to Cust2.First_Name
Find Ge Cust2 by Index.2 // SURNAME,INITIALS,FIRST_NAME,CUST#
While (Found)
Find Gt Cust2 by Index.2 // SURNAME,INITIALS,FIRST_NAME,CUST#
If (Found) Move (Uppercase(Cust2.Surname) = Uppercase(Cust.Surname)) to Found
If (Found) Move (Uppercase(Cust2.Initials) = Uppercase(Cust.Initials)) to Found
If (Found) Move (Uppercase(Cust2.First_Name) = Uppercase(Cust.First_Name)) to Found
<< endless loop >>
Loop
End
It looks like the driver has GE confused over GT finds
ALSO, IF YOU TURN ON DF_DRIVER_USE_CACHE=True then the program crashes !!!