I think I am on a bug here in 10.2B0852.
I have this little cute program:
DEFINE VARIABLE c AS LONGCHAR .
RUN myProc(OUTPUT c).
DEFINE OUTPUT PARAMETER p AS LONGCHAR.
It runs fine if I compile it with: COMPILE test.p SAVE.
But not if I compile it with COMPILE test.p SAVE XREF-XML c:\temp\test.xml
If I run it, I get this error:
Invalid version, 1005 (expected 1006) in object file test.p. (2888)
If I change the parameter to another datatype, it runs fine. Same test in v11.6 also runs fine.
There is a difference in .r files:
This is a bug, I presume?
Compiling with XREF should not change the compilation rules and therefore this is a bug. Please log this issue with Technical Support.
Sr. Development Manager
This bug got fixed in release 11.
Our current workaround is to compile twice if needed: first with the xref-xml option so we can get the xml info. Then we load the file and analyze it to see if a longchar parameter is used. If so, we compile it again. But this time without xref-xml