Focal Point
[Solved] AFTER MATCH HOLD producing incorrect results.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3837077476

February 18, 2015, 12:04 PM
Keith_Tice
[Solved] AFTER MATCH HOLD producing incorrect results.
Match file behaving differently in Production and Development environments
I have the following procedure which creates two hold files and then combines them together using MATCH. The resulting file is different and incorrect in my production environment. Also, no matter which MATCH merge phrase I use I get the same results. OLD-and-NEW, OLD-or-NEW, OLD, NEW, OLD-not-NEW, NEW-not-OLD all produce the same result in my production environment. It is working correctly in my development environment. Also the resulting merged HOLD file in production has the following columns. Notice columns ORG and DEPTDESC are in the file twice.

ORG, DEPTDESC, DF_CFYTD_ARDOLL, DF_PFYTD_ARDOLL, DAYSAR, ORG, DEPTDESC, DF_CFYTD_ADJAR, DF_CFYTD_GRSCHGS12, DF_PFYTD_ADJAR, DF_PFYTD_GRSCHGS12

Resulting merged HOLD file in Development has the following columns, which is correct:

ORG, DEPTDESC, DF_CFYTD_ARDOLL, DF_PFYTD_ARDOLL, DAYSAR, DF_CFYTD_ADJAR, DF_CFYTD_GRSCHGS12, DF_PFYTD_ADJAR, DF_PFYTD_GRSCHGS12

.FEX
-DEFAULTH &WFFMT=HTML;
-DEFAULTH &HSF_FILTER='_FOC_NULL';

-INCLUDE IBFS:/WFC/Repository/Executive_Dashboard/Graphs_and_Reports/inc_as_of_title.fex
-DEFAULTH &VPSTPDFY = ' ';
-DEFAULTH &FYFM = ' ';
-READFILE RPTPERIOD
-SET &CFYM='&FYFM.EVAL';
-SET &CFY = '&VPSTPDFY.EVAL';
-SET &CFYLY = &CFY -1;
-SET &CFYLYLM=&CFYLY.EVAL|'12';

-*-TYPE &CFYM
-*-TYPE &CFY
-*-TYPE &CFYLY
-*-TYPE &CFYLYLM
-*-EXIT

JOIN
LEFT_OUTER VIEW_ARTRENDSUMMARY.ARSUMMARY.ORG
AND VIEW_ARTRENDSUMMARY.DEPARTMENT.DEPTNUM IN VIEW_ARTRENDSUMMARY TO UNIQUE
VIEW_ARTARGETS.ARTARGETS.ORG AND VIEW_ARTARGETS.ARTARGETS.DEPARTMENT
IN VIEW_ARTARGETS TAG J1 AS J1
END

DEFINE FILE VIEW_ARTRENDSUMMARY
DF_CFYTD_ARDOLL/D15 = IF VIEW_ARTRENDSUMMARY.ARSUMMARY.FYFM EQ &CFYM.EVAL
THEN VIEW_ARTRENDSUMMARY.ARSUMMARY.ARBAL ELSE 0;
DF_PFYTD_ARDOLL/D15 = IF ( VIEW_ARTRENDSUMMARY.ARSUMMARY.FYFM EQ &CFYLYLM.EVAL)
THEN VIEW_ARTRENDSUMMARY.ARSUMMARY.ARBAL ELSE 0 ;
END

TABLE FILE VIEW_ARTRENDSUMMARY
SUM
MAX.DAYSAR
DF_CFYTD_ARDOLL
DF_PFYTD_ARDOLL
BY ORG
BY VIEW_ARTRENDSUMMARY.DEPARTMENT.DEPTDESC
WHERE VIEW_ARTRENDSUMMARY.ARSUMMARY.ARAMTLABEL EQ 'Adj AR';
WHERE ( VIEW_ARTRENDSUMMARY.ARSUMMARY.FYFM EQ &CFYM.EVAL OR &CFYLYLM.EVAL)
WHERE ORG EQ '&HSF_FILTER'

ON TABLE HOLD AS H1_ARDOLL
END


DEFINE FILE VIEW_BENCHMARKS
DF_CFYTD_ADJAR/D15 = IF VIEW_BENCHMARKS.BENCHMARKS.FYFM EQ &CFYM.EVAL
AND (VIEW_BENCHMARKS.BENCHMARKS.FM EQ VIEW_BENCHMARKS.RPTPERIOD.FM) THEN
VIEW_BENCHMARKS.BENCHMARKS.ADJAR ELSE 0;
DF_CFYTD_GRSCHGS12/D15 = IF VIEW_BENCHMARKS.BENCHMARKS.FYFM EQ &CFYM.EVAL
AND (VIEW_BENCHMARKS.BENCHMARKS.FM EQ VIEW_BENCHMARKS.RPTPERIOD.FM) THEN
VIEW_BENCHMARKS.BENCHMARKS.GRSCHGS12 ELSE 0;
DF_PFYTD_ADJAR/D15 = IF ( VIEW_BENCHMARKS.BENCHMARKS.FYFM EQ &CFYLYLM.EVAL)
THEN VIEW_BENCHMARKS.BENCHMARKS.ADJAR ELSE 0;
DF_PFYTD_GRSCHGS12/D15 = IF ( VIEW_BENCHMARKS.BENCHMARKS.FYFM EQ &CFYLYLM.EVAL)
THEN VIEW_BENCHMARKS.BENCHMARKS.GRSCHGS12 ELSE 0;
END


TABLE FILE VIEW_BENCHMARKS
SUM DF_CFYTD_ADJAR
DF_CFYTD_GRSCHGS12
DF_PFYTD_ADJAR
DF_PFYTD_GRSCHGS12
BY ORG
BY VIEW_BENCHMARKS.DEPARTMENT.DEPTDESC

WHERE ( VIEW_BENCHMARKS.BENCHMARKS.FYFM EQ &CFYM.EVAL OR &CFYLYLM.EVAL)

WHERE ORG EQ '&HSF_FILTER'
ON TABLE HOLD AS H2_ARDAYS
END
-RUN

MATCH FILE H1_ARDOLL
SUM DF_CFYTD_ARDOLL
DF_PFYTD_ARDOLL
DAYSAR
BY ORG
BY DEPTDESC

RUN

FILE H2_ARDAYS
SUM DF_CFYTD_ADJAR
DF_CFYTD_GRSCHGS12
DF_PFYTD_ADJAR
DF_PFYTD_GRSCHGS12
BY ORG
BY DEPTDESC

AFTER MATCH HOLD OLD-OR-NEW
END

TABLE FILE HOLD
PRINT *
END
-EXIT

Anybody ever had a similar problem?

Thanks

This message has been edited. Last edited by: Keith_Tice,


WebFOCUS 8009, All Outputs
February 18, 2015, 01:20 PM
j.gross
I suspect that the ORG fields of the two source table synonyms have consistent FORAMT attributes in Dev, but inconsistent formats in Prod.

Sprinkle ?FF statements for the two source tables, the two hold files, and the final output of MATCH FILE in your fex, and see if that bears me out.


- Jack Gross
WF through 8.1.05
February 18, 2015, 02:31 PM
Keith_Tice
j.gross

You were exactly right. One was an A7 and the other was A7V. Thanks for the quick response and your time. I thought I had checked the formats. I guess I missed the difference.

Thanks,

Keith


WebFOCUS 8009, All Outputs