sagobogger
Technical User
This is a strange one. I always thought that a DEFINE persisted until the end of a .fex unless reset by something like a CLEAR or JOIN, so you could have all the DEFINE's at the start of the fex and then have multiple TABLE FILE reports off that file in the fex. Now I have run into a situation where a YYM date based DEFINE is losing its value and returning zero after the first report section, but the other DEFINEd fields work fine. I have a work around but I'm curious to know if anyone else has run into this. A simple example:
MYFILE with these fields:
MONTH YYM
DEPARTMENT A30
ITEM A20
SALES P15.2
Start of fex
DEFINE FILE MYFILE
FEB_SALES/P15.2 = IF MONTH EQ '200602' THEN SALES ELSE 0;
END
TABLE FILE MYFILE
SUM FEB_SALES SALES
BY ITEM
END
TABLE FILE MYFILE
SUM FEB_SALES SALES
BY DEPARTMENT
END
End of fex
FEB_SALES works in the first report, but returns zero in the second.
If I change the DEFINE to:
DEFINE FILE MYFILE
THISMO/YYM = '200602'
FEB_SALES/P15.2 = IF MONTH EQ THISMO THEN SALES ELSE 0;
END
then FEB_SALES works correctly in all the TABLE FILE reports in the .fex.
Ideas anyone?
MYFILE with these fields:
MONTH YYM
DEPARTMENT A30
ITEM A20
SALES P15.2
Start of fex
DEFINE FILE MYFILE
FEB_SALES/P15.2 = IF MONTH EQ '200602' THEN SALES ELSE 0;
END
TABLE FILE MYFILE
SUM FEB_SALES SALES
BY ITEM
END
TABLE FILE MYFILE
SUM FEB_SALES SALES
BY DEPARTMENT
END
End of fex
FEB_SALES works in the first report, but returns zero in the second.
If I change the DEFINE to:
DEFINE FILE MYFILE
THISMO/YYM = '200602'
FEB_SALES/P15.2 = IF MONTH EQ THISMO THEN SALES ELSE 0;
END
then FEB_SALES works correctly in all the TABLE FILE reports in the .fex.
Ideas anyone?