It works with CAR file. However when I try to use my file, it says it could not find the field "MV_KR3M". This is the field that I define at the beginning of the fex. Below is my entire .FEX. Thanks
DEFINE FILE FINANCIAL_MODELING_PORTAL
MV_KR3M/D12.2=MV* KRD03M;
MV_KR6M/D12.2=MV* KRD06M;
MV_KR1Y/D12.2=MV* KRD01Y;
MV_KR2Y/D12.2=MV* KRD02Y;
MV_KR3Y/D12.2=MV* KRD03Y;
MV_KR5Y/D12.2=MV* KRD05Y;
MV_KR7Y/D12.2=MV* KRD07Y;
MV_KR10Y/D12.2=MV* KRD10Y;
MV_KR15Y/D12.2=MV* KRD15Y;
MV_KR30Y/D12.2=MV* KRD30Y;
END
FILEDEF FOCM DISK FOCCACHE/FOCMCGYV1.MAS
-RUN
-WRITE FOCM FILENAME=FOCMCGYV1, SUFFIX=FIX
-WRITE FOCM SEGNAME=ONE
-WRITE FOCM FIELD=BLANK,,A1,A1,$
-WRITE FOCM SEGNAME=TWO,PARENT=ONE, POSITION=BLANK, OCCURS=VARIABLE
-WRITE FOCM FIELD=CHAR,,A1,A1,$
-WRITE FOCM FIELD=CTR,ORDER,I4,I4,$
-RUN
FILEDEF FOCM CLEAR
FILEDEF FOCMCGYV1 DISK FOCCACHE/FOCMCGYV1.DAT (LRECL 3 RECFM F
-RUN
-WRITE FOCMCGYV1 X
-RUN
JOIN X WITH FINANCIAL_MODELING_PORTAL.ZMHDMONTHLY.PORTFOLIO IN FINANCIAL_MODELING_PORTAL TO BLANK IN FOCMCGYV1 AS J1.
DEFINE FILE FINANCIAL_MODELING_PORTAL
X/A1 WITH FINANCIAL_MODELING_PORTAL.ZMHDMONTHLY.PORTFOLIO= 'X';
VALUES/D12.2 = IF CTR EQ 1 THEN MV_KR3M ELSE
IF CTR EQ 2 THEN MV_KR6M ELSE
IF CTR EQ 3 THEN MV_KR1Y ELSE
IF CTR EQ 4 THEN MV_KR2Y ELSE
IF CTR EQ 5 THEN MV_KR3Y ELSE
IF CTR EQ 6 THEN MV_KR5Y ELSE
IF CTR EQ 7 THEN MV_KR7Y ELSE
IF CTR EQ 8 THEN MV_KR10Y ELSE
IF CTR EQ 9 THEN MV_KR15Y ELSE
IF CTR EQ 10 THEN MV_KR30Y ELSE (-1);
GROUPS/A11 = DECODE CTR(
1 'MV_KR3M'
2 'MV_KR6M'
3 'MV_KR1Y'
4 'MV_KR2Y'
5 'MV_KR3Y'
6 'MV_KR5Y'
7 'MV_KR7Y'
8 'MV_KR10Y'
9 'MV_KR15Y'
10 'MV_KR30Y'
ELSE ' ');
END
GRAPH FILE FINANCIAL_MODELING_PORTAL
SUM VALUES
BY FINANCIAL_MODELING_PORTAL.ZMHDMONTHLY.PORTFOLIO
ACROSS GROUPS AS ' '
WHERE VALUES NE -1
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET VZERO OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
ENDSTYLE
END
WebFOCUS 8.1.05
Windows, All Outputs