Adding fields in a data structure and BSFN doesn't build anymore

Jef

Member
Adding fields in a data structure and BSFN doesn\'t build anymore

Hi,
I have a custom business function (55) that was correctly working since one year. It contain some function, all in NER not C, and all these function has the data structure for parameter. Note
that I'm working in our development environnement... (DV810)

Now, I got to pass newer parameter to one function in this BSFN, and for doing that, I have added two new alias in my data structure that I checked out before. After, I return in the BSFN juste for testing if receive my new parameter is working correctly, I just try to assign one of the new parameter to a variable in the function. I save my function, and go to build the business function. Result: I got error!

Busbuild return error like:
- undeclared identifier
- see declaration of tagDSXXXXXX
- nonstandard expression used : non-constant aggregate initializer


I think that I proceed correctly and "cleanly" in my development... What can I do to get my BSFN correctly build again with the new field??
confused.gif


Note that when I remove the new fields, the BSFN build #1...

Thanks!
 

Attachments

  • 115001-FILE.zip
    317.8 KB · Views: 175
Re: Adding fields in a data structure and BSFN doesn\'t build anymore

Hi Jef,

I am not familiar with the toolset of 8.10, but your issue sound so, that BusBuild does not re-create the DS definition source.

Generate the TypeDef in the DSTR Designer and paste it into editor.
Locate the .h file of your BSFN and open it.
Compare the "DS Template Type Definitions" in the .h and in the newly generated definition.

If your new DS members are missing in the .h file, then replace the definition with the new one and Re-Build the BSFN. Maybe it can solve your problem, but this isn't a real solution.

Check your BSFN designer tool, is there any function there, which re-build your .h after DS changes? Maybe, this is the real solution.

Finally a dummy question: did yo placed your new DS members to the end of the structure, didn't you?

Please, let us know your results. Thanks.

Regards & Good Luck,

Zoltán
 
Re: Adding fields in a data structure and BSFN doesn\'t build anymore

Hi Jef
the problem is that you use the same datastructure as parameter to different bsfn in different modules. This is not a problem as long as you do not modify the DS.
If you do you need to checkout all NERs that use this DS as their parameter, rebuild and check in. In you case the offending NER is N552206. If you open N552206.h on line 137 you will see the old definition before your changes.
Because N552206.h is included in N552203.c on line 29 but N552203.h is included in the same file on line 59 compiler will encounter and use the old definition from N552206.h
Anyway, this practice is very bad (TM) and you see the consequences now.
Michal
 
Re: Adding fields in a data structure and BSFN doesn\'t build anymore

Yes, I have added my field at the "end" of the datastructure. When I open the header file, I see my two news field, they are there yes! However, when building, it doesn't want to complete succesfully.

I would to copy the type def form my data structure, but I have discover another bug: When I click on "Create type definition", I get a fatal error about the bsfn maintainobject, and in my jde.log, I have the following error:

JDEPPClearSpec: Failed to clear BSFN_D552203 specs.

D552203 is a data structure, why it say that?!


Is there any way to "reset" or regenarete the .h for a custom BSFN? NOTE THAT IS IT A NER...

Thanks to you...
 
Re: Adding fields in a data structure and BSFN doesn\'t build anymore

Michal, you're right, I have checked-out the other BSFN and compile it, and now all is working fine!

I had never realise about that bad practice: You know, when coding in NER BSFN, you don't really control your code and declaration, like in real C, and it's I couldn't see that bad mistake...

Really, thank to you, a lot Michal.
 
Back
Top