Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Incomplete End Result Reporting

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Incomplete End Result Reporting
 Login/Join
 
Member
posted
Dear All,

I'm trying to built a report defined by Age Group.

I replicated the codes for each of the Age Group and make the necessary changes.

When I run the report in Developer Studio Tool, I will get each Age Group result successfully.

However, when I run the report in Text Editor, the end result always stopped at Age Group 26 -35.

Below is the code snippet :

-* File Transaction_AgeVsMCC_V3.fex
-INCLUDE gen_def_env_vars
-SET &IMGURL = IF &WFFMT EQ 'HTML' THEN &HTMLIMGURL ELSE &PDFIMGURL

SET EMPTYREPORT = ON
JOIN
CUST_V3.CUST_V3.IPKIPN IN CUST_V3 TO MULTIPLE CARD_V3.CARD_V3.KTKIPN IN CARD_V3
TAG J0 AS J0
END
JOIN
J0.CARD_V3.KTKRTN IN CUST_V3 TO MULTIPLE PURCH_V3.PURCH_V3.TRKRTN IN PURCH_V3
TAG J1 AS J1
END
JOIN
FILE CUST_V3 AT J1.PURCH_V3.TRMCC TO MULTIPLE FILE MCC_V3
AT MCC_V3.MCC_V3.MCMCC TAG J2 AS J2
WHERE J2.MCC_V3.MCNETW EQ 'M' AND J1.PURCH_V3.TRMCC EQ J2.MCC_V3.MCMCC;
END
DEFINE FILE CUST_V3
DATE1/A10='&dateFrom';
DD1/A2=EDIT(DATE1,'99$$$$$$$$');
MM1/A2=EDIT(DATE1,'$$$99$$$$$');
YY1/A4=EDIT(DATE1,'$$$$$$9999');
DATE2/A10='&dateTo';
DD2/A2=EDIT(DATE2,'99$$$$$$$$');
MM2/A2=EDIT(DATE2,'$$$99$$$$$');
YY2/A4=EDIT(DATE2,'$$$$$$9999');
DATEFROM/YYMD=DATECVT(EDIT(DD1|MM1|YY1),'I8DMYY','I8YYMD');
DATETO/YYMD=DATECVT(EDIT(DD2|MM2|YY2),'I8DMYY','I8YYMD');
CURRDT/DMYY='&DMYY';
DOB/DMYY=HDATE(CUST_V3.IPFDAT, 'YYMD');
AGE/I5-=DATEDIF(DOB, CURRDT, 'Y');
BDAT/DMYY=HDATE(J1.PURCH_V3.TRBDAT, 'YYMD');
18_25/I7=IF AGE GE 18 AND AGE LE 25 THEN + 1 ELSE + 0;
26_35/I7=IF AGE GE 26 AND AGE LE 35 THEN + 1 ELSE + 0;
36_45/I7=IF AGE GE 36 AND AGE LE 45 THEN + 1 ELSE + 0;
46_55/I7=IF AGE GE 46 AND AGE LE 55 THEN + 1 ELSE + 0;
56_ABOVE/I7=IF AGE GE 56 THEN + 1 ELSE + 0;
END

SET COMPOUND=OPEN NOBREAK
-*AGE 18 - 25
TABLE FILE CUST_V3
SUM
'CUST_V3.CUST_V3.18_25/I9C' AS 'No. OF TRANSACTION'
BY 'J1.PURCH_V3.TRMCC' AS 'MCC CODE'
BY 'J2.MCC_V3.MCDESC' AS 'MERCHANT CATEGORY'
ACROSS 'J1.PURCH_V3.TRRKID' AS 'PRODUCT'
ON TABLE SUBHEAD
" "
" "
HEADING
"TRANSACTION BY MCC FROM <+0>&dateFrom<+0> <+0>TO<+0> <+0>&dateTo"
" "
"AGE VS MCC (18 - 25)"
" "
WHERE PURCH_V3.TRTRST EQ 0;
WHERE PURCH_V3.TRMCC NE '';
WHERE BDAT GE DATEFROM;
WHERE BDAT LE DATETO;
ON TABLE SET PAGE-NUM ON
ON TABLE SUMMARIZE AS 'TOTAL'
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *



$
ENDSTYLE
END



I would very much appreciate it if anyone could help to debug it.

Thanks..JS

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


R7.7.0.1
Windows, All Outputs
 
Posts: 15 | Location: Malaysia | Registered: January 19, 2012Report This Post
Guru
posted Hide Post
Do you need the "+" signs in the below code?
quote:

18_25/I7=IF AGE GE 18 AND AGE LE 25 THEN + 1 ELSE + 0;
26_35/I7=IF AGE GE 26 AND AGE LE 35 THEN + 1 ELSE + 0;
36_45/I7=IF AGE GE 36 AND AGE LE 45 THEN + 1 ELSE + 0;
46_55/I7=IF AGE GE 46 AND AGE LE 55 THEN + 1 ELSE + 0;
56_ABOVE/I7=IF AGE GE 56 THEN + 1 ELSE + 0;


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Member
posted Hide Post
Dear N.Selph,

I have removed the '+' sign for further testing and I still manage to get the same result. I guess the sign does not play a role here. Thanks...

However, I'm still not able to get the whole result.


Regards,
JS


R7.7.0.1
Windows, All Outputs
 
Posts: 15 | Location: Malaysia | Registered: January 19, 2012Report This Post
Expert
posted Hide Post
Syntax error:
  
18_25/I7=IF AGE GE 18 AND AGE LE 25 THEN LAST 18_25 + 1 ELSE 0;
26_35/I7=IF AGE GE 26 AND AGE LE 35 THEN LAST 26_35 + 1 ELSE 0;
36_45/I7=IF AGE GE 36 AND AGE LE 45 THEN LAST 36_45 + 1 ELSE 0;
46_55/I7=IF AGE GE 46 AND AGE LE 55 THEN LAST 46_55 + 1 ELSE 0;
56_ABOVE/I7=IF AGE GE 56 THEN         LAST 56_ABOVE + 1 ELSE 0;


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
You show only the opening report in the compound-report series, for the first age group total, 18_25. Presumably that is followed by similar ones for the other four age-group sums that you define.

I suggest you grab all the necessary data in a single pass (summing a general counter by an age_group indicator into a hold file), and generate all the reports against the resulting hold file. At least that gives you a means to verify that all the data are accessible.

If the range of PRODUCT values (the set of ACROSS columns) to appear is constant over the age groups, you can avoid the compound report entirely:
JOIN ...
DEFINE FILE CUST_V3
. . .
 AGE_GROUP/A1=
IF AGE LT 18 THEN ' ' 
ELSE IF AGE LE 25 THEN 'A' 
ELSE IF AGE LT 35 THEN 'B' 
ELSE IF AGE LT 45 THEN 'C' 
ELSE IF AGE LT 55 THEN 'D' ELSE 'E';
 COUNTER/I9C with MCMCC=1;
. . .
END
TABLE FILE CUST_V3
SUM COUNTER
BY AGE_GROUP
BY TRMCC
BY MCDESC 
BY TRRKID
WHERE ...
ON TABLE HOLD
END

DEFINE FILE HOLD
 DEMOGRAPHIC/A20=DECODE AGE_GROUP (
A '18 - 25'
B '26 - 35'
C '36 - 45'
D '46 - 55'
E '56 and Above'
ELSE ' ');

END
TABLE FILE HOLD

HEADING
. . .
"AGE VS MCC <DEMOGRAPHIC"
. . .

SUM COUNTER AS 'NO OF TRANS'
BY AGE_GROUP NOPRINT PAGE-BREAK
BY . . .
ACROSS PRODUCT
WHERE AGE_GROUP NE ' ';
. . .
END


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
Since this is a boolean test, I would code it like this:
18_25/I7=AGE GE 18 AND AGE LE 25;
26_35/I7=AGE GE 26 AND AGE LE 35;
36_45/I7=AGE GE 36 AND AGE LE 45;
46_55/I7=AGE GE 46 AND AGE LE 55;
56_ABOVE/I7=AGE GE 56;


This is more efficient and WebFOCUS/FOCUS assigns a value of 1 when true and a value of 0 when false.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Member
posted Hide Post
Dear All,

Thank you very much for sharing your ideas and codes with me. I truely appreciate all the assistance provided by you guys.


Thanks... JS


R7.7.0.1
Windows, All Outputs
 
Posts: 15 | Location: Malaysia | Registered: January 19, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Incomplete End Result Reporting

Copyright © 1996-2020 Information Builders