The data item size for the structure member has changed

Frosty the Coder

Legendary Poster
List,

Continuing the adventure of XE to 9.1, which includes conversion to unicode,
a custom UBE has custom DD items in its report data structure.

In RDA, clicking on File, Report Data Structure, throws an error
"The data item size for the structure member, XXXX, has changed since the data structure last changed.
The length has been fixed and you need to resave to fix specifications.
Any static type definitions of this data structure needs to be regenerated."

I have clicked my way through each item in the data structure, and saved the UBE.
When I open RDA back up, and go to the report data structure, I still get the error message.

I've tried deleting the global tables and repeated the process but still get the error.

I've looked at the DD items, compared them to XE, deleted the global tables and still get the error.

The UBE works correctly, when run via debug and populating the interconnects, but doesn't work when launched from UBE, NER, or APPLs.

If I were to delete the items in the data structure, it will mess up the sequence of the elements and force me to repoint everywhere the UBE is called.

I've checked the Oracle site, but didn't notice any discussion of this issue.

Short of recreating the UBE from scratch, what can I do to try to get past this issue?
confused.gif


Please AND Thanks
 

peterbruce

Legendary Poster
Frosty,

I take it that the custom DD item specifications are the same in 9.1 to Xe.

Did you resave the custom DD item and then delete infamous 6 files (dddict.ddb, dddict.xdb, ddtext.ddb, ddtext.xdb, glbltbl.ddb, glbltbl.xdb,) and then open the RDA? If all this is done on the same fat dev/admin client I'm not sure that you need to delete the files.

Have you got a debug log of the attempt to run the report?
 

JMR

VIP Member
Did you try to generate the report header file? (File | Report Properties | Advanced Tab )

Try to do that and look at the output (it will reside in the \include folder as a .h file with the base name that of the UBE object name.

It is a c-language data structure that is generated. Compare the field definitions in the output to the DD field definitions to make sure they're the same.

If you have any calls to the UBE from any bsfn's, they should be rebuilt (NEED to be rebuilt if any actual data items changed between your releases). Also, you should also try to recreate the calls in the any other UBE's or APPL's that call the UBE...just to be on the safe side.

If your custom DD item is a string data item, it may be still think it's the non-unicode version (ie the c-data structure may still have char data type instead of JCHAR).

Good luck.
 

Frosty the Coder

Legendary Poster
I did find the .h in the include.
The strings are JCHAR, and each is one character longer than the DD length.
I don't think this is the issue, but I will regenerate it per your instructions.
I've done rebuilds on the NERs that call the UBE, but still get the length error in RDA,
and still get "no records selected" as data selection looks at an RI.

Thanks!
 

JMR

VIP Member
Hmmmm...I can only imagine there is some corruption in that RI structure. Have you tried viewing the specs in UTB? How about a tool like Object Browser?

I'd just try to peek at how those tools "see" the specs for that structure. See if they give any indication as to an issue.

From how many places is this UBE called? You mention not wanting to "re-hook" all those calls, but then go on to mention having to recreate the UBE from scratch.
I have to believe that it would be easier to wipe the RI, recreate it, and then go into all the ER from where it's called and redo the call than recreating the UBE from scratch. Actually, you'd have to change all the ER calls anyway in that scenario.

Have you looked at the debug logs at the point you get the error in Report Design? At the point where the UBE is called from other objects? Anything telling in there?
 

Frosty the Coder

Legendary Poster
I looked at the specs via object browser, and they show the correct lengths.

Looking at the .h in /include shows strings as JCHAR and being one longer than they are in DD.
I checked the .h for a different UBE and it shows the same way.

Rehooking where this UBE is called from is less effort than recreating the UBE and still having to go everywhere it is called from.

As noted in my prior posts, I have clicked OK on the DD items, deleted the globals, exited JDE, rebooted, and gone back in.

Debug logs don't show anything of interest, either from OMW or launching the UBE.

I did regenerate the .h from file/report properties/advanced.
The .h shows today's date.

Is this how I would "wipe" the RI?
If not, how would I do that and begin reattaching?

Thanks very much!
 

JMR

VIP Member
By "wiping" the RI, I meant just delete all the RI elements from the structure and re-add them. This method will require ER maintenance in the UBE itself and also in each place the UBE is called from other objects.

Maybe I'm misunderstanding something and you're not able to alter the data structure because of the errors you're receiving.

And, yes, all c-data structures show a length of 1 more than the defined DD length for strings...that is to account for the null character.
 

Frosty the Coder

Legendary Poster
I am very pleased to say that recreating the report data structure worked!

I created global report variables to use instead of the corrupt RIs,
changed all ER and data selection to use those global RVs,
deleted the existing elements w/in the report data structure,
re-added the same elements back into the data structure,
and assigned the new global RVs to equal the new RIs in the driver initialize section.

Things I was reminded of, or learned, during this:
Issues with report data structure aren't noted during "validate event rules".
Issues with section data selections aren't noted during "validate event rules".
Converting to DBCS may cause custom DD items to say the size has changed.

Peter and Jeremy, thank you both very much!
 
Top