I would say your issue has very little to do with the SELECT or any SQL at all.
Your culprit is buried in the macro call
%SSCFLAT(MSASDS=WORK.PRICFI,MPREFIX=USER1.PG34.);
The output generated at one or more points in that macro is what is using the format(s) and would need to examine that.
You get more details of exactly which step or generated code is causing the message by setting Options Mprint; before the macro runs so the log will show the messages in relation to the code generated.
options mprint;
%SSCFLAT(MSASDS=WORK.PRICFI,MPREFIX=USER1.PG34.);
options noprint;
Normally when you get a change to Best format from a too small the NUMBER of decimal places changes, not the position. Too small generally means that the integer portion won't fit resulting in rounding of the decimal values or the value is enough incompatible with the format it shifts to scientific notation. Which might look like a shift of decimal point if the exponential part is ignored or lost for some reason.
data example;
x=123456789;
run;
proc print data=example;
format x 6.2;
run;
result is 1.23E8 because it is trying to fit into 6 character positions. 1.23 are the first 4 and E8 is the exponential part. It looks like decimal shift but only if you ignore the E8. From the text in your log about FILE FLATOUT it appears something is writing a text file and I have a sneaking suspicion that it may be going into a fixed column layout where possibly the exponent is getting overwritten in the output. Or perhaps someone isn't recognizing what the like E4 (or similar) means.
... View more