Build Fails due to € - fatal error C1057: unexpected end of file in macro expansion

HolderAndrew

Well Known Member
Hi all,

We are using 9.1 TR 9.1.5.5 on iseries V7R2

Created custom NER which is designed to replace a string containing the euro "€" character with a replacement character such as "e"

This works fine locally on dev client but when building client package we get failure as below in worklog. The line of code it refers to (ie. line 2088) is where we are passing "€" in the DSTR to the BSFN that replace the character (in this case B0400520)

BUILD LOG

Package: DVD05221
Date: Tue May 22 13:04:44 2018
Build Machine: DENUxxxxxx

N592004.c
\\DENUxxxxxxx\E910\DV910\package\DVD05221\source\N592004.c(2088) : fatal error C1057: unexpected end of file in macro expansion

Does anybody have any ideas how we can get round this issue? We can probably create a more generic function to replace "special characters" without referencing them specifically but I am surprised that the humble € character is such a villain!

Would P93081 file encoding be a factor in this?

Best regards.
 
Hi Andrew,

Try mapping a variable to the DSTR rather than passing "€" directly and see if that fixes the issue.

Regards,

Neal
 
Hi,

Unfortunately this did not work - we got the same error.

So I am trying to raise this to internal CNC team and if no luck to Oracle.

At same time I will develop a "special char" catch all replace function and check if this can satisfy the requirements. Problem is that we have Scandinavian and Baltic characters that we would like to retain.

Regards.
 
You may want to look at the CCSID of the job doing the compile. Make sure that it is using a unicode (13488?) CCSID.

Tom
 
Hi,

This is now solved - the clue was in an old post that I saw from Zoltan - I copied the code from the NER Nxxxxx to a C BSFN Bxxxxxx and now the build has succeeded. Really weird that NER runs ok locally but cannot be built on server. We have noticed in the past that update build packages fail when NERs call NERs but are successful in full builds. So maybe this is related.

Anyway - it works now so I wont spend any more energy determining exactly why it was a problem. Thanks for the replies.

BR
Andrew
 
Hi,

just an update for those interested. The build worked ok when in C bsfn rather than NER but it still failed to replace the € character. The solution was to use UDC 04/RC and define the char to search in DL01 position 1 and the char to replace in DL02. So KY = "EU" DL01 = '€' and DL02 = 'e' and then call B0400520 passing '1' in the cUseUDCReplacement DSTR element. I don't know why this works and not when you pass € directly - but that is the wonder of JDE!


best regards
Andrew
 
First of all, thanks... This post help me to solve the problem in my case an I would like to add some things could help someone too.

I was getting the same error after make a refactoring in a NER code.

"fatal error C1057: unexpected end of file in macro expansion"

The line error (at C code) pointed to

/* VA evt_szSinalAspasDuplas_AA02 = """ */
jdeStrncpyTerminate( evt_szSinalAspasDuplas_AA02 , _J(""") ,
DIM( evt_szSinalAspasDuplas_AA02 ) );

So at the NER code I made the following change tha solved the problem:

VA evt_cChar_CHAR = """
VA evt_szSinalAspasDuplas_AA02 = VA evt_cChar_CHAR
 
Back
Top