Hi
Here's a strange one. We've just started getting this error. When loading the .gen file, the system crashes preparing the TT. On inspection the .gen file has two primary indices for a temp-table. This is clearly wrong. Has anyone come across this before?
There's nothing wrong with the class as far as I can see. I came out of eclipse and went back in and now a different temp-table is getting multiple primary indices. This is 12.1. We've never had this before and we have 300 BE's.
It all started when I moved the primary index in our temp-table's from the default to the seq index. I had incorrectly dumped our schema as temp-tables with the seq index non primary and so it was messing up server side sorting. Our TT definitions are static and so there is only one primary index specified. Its almost like our schema has been cached by eclipse and its making a mess now when we dump the .gen.
As we add the seq JFP stuff to temp-tables based on need, we can have the same temp-table "name" in different datasets where the primary index is different for those two temp-tables which share the same name. The .gen and DOH are fine with this but I cant be certain if the eclipse bit which exports it all is.
-Darren
PS. I removed the ABL Service and recreated it too and it has no effect.
Its driving me mad. I raised it with TS on Friday. Is this all java which creates this? I'd like to debug it if I could.
I'm struggling with around 400 datasets to find which temp-table(s) is causing the issue so I'm wring a a routine to parse it and tell me so I can get to a position where I can check-in the .gen as I have 3 other people dependent on this system internally.
Are there any temp-files or similar working files which I could clear out which the java creates and maintains. I did notice a tendency for the routine to produce the same results like something was being retained until eclipse was restarted.
-D
OK. I parsed it and it showed me where the error was. I'm editing the .gen manually.
I think its struggling with the preprocessor. Its mostly ok but not always. I seem to have a single error in the .gen.
The bottom of the of the temp-table include file is as follows. Like I said we reuse the temp-table defn in different places.
The following is included by a dataset defn which a single BE uses. The .gen results in error
&IF "{1}" = "JFP" &THEN
FIELD id AS CHARACTER FORMAT "X(8)"
FIELD seq AS INTEGER FORMAT ">>>>>>9" INITIAL ?
&ENDIF
INDEX CompanyParametersP IS UNIQUE &IF "{1}" <> "JFP" &THEN PRIMARY &ENDIF CompanyCode
&IF "{1}" = "JFP" &THEN
INDEX seq IS PRIMARY UNIQUE seq ASCENDING
&ENDIF
Heres the .gen snippet.
"indexes": {
"CompanyParametersP": {
"primary": true,
"unique": true,
"word": false,
"fields": ["CompanyCode:asc"]
},
"seq": {
"primary": true,
"unique": true,
"word": false,
"fields": ["seq:asc"]
}