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.
Comment out your ON TABLE PCHOLD statement and allow WebFOCUS to generate the output in HTML format. Also put an ECHO statment at the top of the program. These steps should allow you to see any errors generated and determine if reasonable output is being produced before moving to Excel output.
-SET &ECHO=ALL;
.
.
.
-*ON TABLE PCHOLD AS WFGN FORMAT EXL2K
.
.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
I tried Dan's steps, but was not successful, it gave starred output in html too without any error.
As JG suggested i made my define more simple as below
DEFINE FILE AAAA DATEA/A10 = TODAY(DATEA); DATEH/HDMYYS = HINPUT(10, DATEA, 8, 'HDMYYS'); D_TOD/YYMD=HDATE(DATEH,'YYMD'); DATE_SER/YYMD MISSING ON = HDATE(BASE_SERVICE_DT,'YYMD'); SERV_YRS/I8 = IF DATE_SER IS MISSING THEN ' ' ELSE DATEDIF(DATE_SER,D_TOD,'Y'); -* EMPL_STATUS/A34 = IF L9SF_EMPL_STATUS = ' ' THEN ' ' ELSE EDIT(L9SF_EMPL_STATUS,'9') |' - '| L9SF_EMP_STAT_DESC; END -RUN
TABLE FILE AAAA PRINT SERV_YRS EMPL_STATUS ON TABLE PCHOLD AS WFGN FORMAT EXL2K END -RUN -* -* -EXIT
But it gave format compatability error stating SERV_YRS is not compatible, but then I tried as below DEFINE FILE AAAA DATEA/A10 = TODAY(DATEA); DATEH/HDMYYS = HINPUT(10, DATEA, 8, 'HDMYYS'); D_TOD/YYMD=HDATE(DATEH,'YYMD'); DATE_SER/YYMD MISSING ON = HDATE(BASE_SERVICE_DT,'YYMD'); SERV_YRS/I8 =DATEDIF(DATE_SER,D_TOD,'Y'); -* EMPL_STATUS/A34 = IF L9SF_EMPL_STATUS = ' ' THEN ' ' ELSE EDIT(L9SF_EMPL_STATUS,'9') |' - '| L9SF_EMP_STAT_DESC; END -RUN
TABLE FILE AAAA PRINT SERV_YRS EMPL_STATUS ON TABLE PCHOLD AS WFGN FORMAT EXL2K END -RUN -* -* -EXIT it ran properly and gave me output, but not as per the requirement, even for rows which don't have BASE_SERVICE_DT had some value as 109.
Any suggestion of what could be wrong with the IF loop in DEFINE
WebFocus 5.2.5 HP-UX(UNIX) EXCEL, HTML, PDF and OLAP
Fix the syntax errors as JG identified to avoid unexpected results.
In my experience(hope you gurus will validate this for me), that it is almost always not a good time to test for missing values in DEFINE. I have better luck with COMPUTE or put it in the hold file first.
Hua
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008