The clients system has V5R3 test and production partitions, supposedly identical.
SQLRPGLE program compiles in test but fails to compile in production with a bunch of SQL0312 Position nn Variable xxxxxxxx not defined or not usable. All of the xxxxxxxx fields are in an externally defined printer file. The program can optionally write these same fields to an outfile in qtemp which is created in this same program via SQL Create Table.
Perhaps the question should be, "Why does it compile in test?". The only definitions of those fields is in the external printer file. No copy of the outfile exists on the test box. If I look at the precompiler source in qtemp I can see where SQL generates the work field definitions, but no clue where it is getting them.
I got tired of fighting with it, so I added D XXX.DS E DS EXTFILE(PRINTFILE:FORMATXXX:*ALL) to the source in production and it STILL WON'T COMPILE. WTF!
Yes, the library list is correct. There is only one copy of the external printer file. I FTPed the source twice.
Could SQL have cashed a copy somewhere during development? The outfile does not exist in qsys/qadfifld or qsys2/syscolums which makes sense because it never existed anywhere but qtemp.
SQLRPGLE program compiles in test but fails to compile in production with a bunch of SQL0312 Position nn Variable xxxxxxxx not defined or not usable. All of the xxxxxxxx fields are in an externally defined printer file. The program can optionally write these same fields to an outfile in qtemp which is created in this same program via SQL Create Table.
Perhaps the question should be, "Why does it compile in test?". The only definitions of those fields is in the external printer file. No copy of the outfile exists on the test box. If I look at the precompiler source in qtemp I can see where SQL generates the work field definitions, but no clue where it is getting them.
I got tired of fighting with it, so I added D XXX.DS E DS EXTFILE(PRINTFILE:FORMATXXX:*ALL) to the source in production and it STILL WON'T COMPILE. WTF!
Yes, the library list is correct. There is only one copy of the external printer file. I FTPed the source twice.
Could SQL have cashed a copy somewhere during development? The outfile does not exist in qsys/qadfifld or qsys2/syscolums which makes sense because it never existed anywhere but qtemp.
Comment