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.
I want to display the footing with numeric values. Now i am able to display the values in alpha format, but i want these in D12.2C format.
When i read the data from the hold file it is giving longer data as clubbing two values.
Here is the example.
quote:
-SET &ECHO ='ALL'; -DEFAULT &cntry=''; TABLE FILE CAR SUM DEALER_COST BY COUNTRY ON TABLE HOLD AS CARHLD FORMAT ALPHA END -RUN -SET &NBR = &LINES; TABLE FILE CAR PRINT 'CAR.BODY.SEATS' AS 'SEATS' 'CAR.BODY.DEALER_COST' BY 'CAR.COMP.CAR' BY 'CAR.CARREC.MODEL' HEADING "SAL" FOOTING -REPEAT L_LOOP1 &NBR TIMES -READ CARHLD NOCLOSE &CTR.A11. &CAR.16. " <+0><+0>&CAR<+0>&CTR<+0> " -L_LOOP1 END
Please help me.........!
Koteswar, WF76.11,windows xp.This message has been edited. Last edited by: Kerry,
statement. The Country field is only an A10 and your asking for 11. Also, the Dealer Cost field is only a D7 and your asking for 16 characters. This is why you are receiving values that look like they are concatenated.
Try this.
-SET &ECHO ='ALL';
-DEFAULT &cntry='';
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
ON TABLE HOLD AS CARHLD FORMAT ALPHA
END
-RUN
-SET &NBR = &LINES;
TABLE FILE CAR
PRINT
'CAR.BODY.SEATS' AS 'SEATS'
'CAR.BODY.DEALER_COST'
BY 'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL'
HEADING
"SAL"
FOOTING
-REPEAT L_LOOP1 &NBR TIMES
-READ CARHLD NOCLOSE &CTR.A10 &CAR.7
" <+0><+0>&CAR<+0>&CTR<+0> "
-L_LOOP1
END
Then work on formatting the Dealer Cost and such in the Footing.
WebFOCUS 7.7.03 Windows Web Server 2008 MS SQL Server 2000 Excel,CSV,PDF,HTML
Posts: 71 | Location: Kingston, ON | Registered: May 03, 2011
Use -READFILE instead of -READ - you'll never have the wrong format again!
Use FPRINT to change the format of the data.
-SET &ECHO ='ALL';
SET ASNAMES=ON
-RUN
-DEFAULT &cntry='';
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
ON TABLE HOLD AS CARHLD FORMAT ALPHA
END
-RUN
-SET &NBR = &LINES;
TABLE FILE CAR
PRINT
'CAR.BODY.SEATS' AS 'SEATS'
'CAR.BODY.DEALER_COST'
BY 'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL'
HEADING
"SAL"
FOOTING
-REPEAT L_LOOP1 &NBR TIMES
-READFILE CARHLD
-SET &DEALER_COSTX = FPRINT(&DEALER_COST, 'D10.2', 'A12');
" <+0><+0>&DEALER_COSTX<+0>&COUNTRY<+0> "
-L_LOOP1
END
-RUN
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
I would use the new READFILE command instead of READ: one does not have to count characters:
-* File koteswar01.fex
-SET &ECHO ='ALL';
-DEFAULT &cntry='';
DEFINE FILE CAR
DLCOST/D8.2=DEALER_COST;
END
TABLE FILE CAR
SUM DLCOST
BY COUNTRY
ON TABLE HOLD AS CARHLD
END
-RUN
-SET &NBR = &LINES;
TABLE FILE CAR
PRINT
'CAR.BODY.SEATS' AS 'SEATS'
'CAR.BODY.DEALER_COST'
BY 'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL'
HEADING
"SAL"
FOOTING
-REPEAT L_LOOP1 &NBR TIMES;
-READFILE CARHLD
" <+0> <+0>&COUNTRY<+0>&DLCOST"
-L_LOOP1
-CLOSE CARHLD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=FOOTING, HEADALIGN=BODY, $
TYPE=FOOTING, ITEM=4, JUSTIFY=RIGHT, $
ENDSTYLE
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
Unfortunately it seems as though Koteswar is using WF 7.6.11 (based on the original post) and if my understanding is correct both -READFILE and FPRINT are new features introduced to the product in 7.7.
dburton's suggestion would be the one to follow for now.
I know! If there is something really cool that has been added to Dialogue Manager recently, that has to be precisely -READFILE. I haven't used -READ anymore since riding on the 7.7 wagon.
I am able to read the values and displaying in Alpha format as per the "dburton" comments. But how can i change the format from Alpha to decimal (D12.2C) to display in footing.
how can i change the format from Alpha to decimal (D12.2C) to display in footing.
Well, as soon as you've -READ your value into a &variable you'll end up with a string that looks like a number so just use the FTOA function to format that "number" into the pattern you need.
You want to convert an alpha to number but in reality, you'll end up just formatting a "numeric" alpha into a new alpha. Boy, just by reading the latter I got myself confused
Anyway, the fact that you're dealing with numbers or alphas in this case becomes irrelevant in the world of Dialogue Manager.
Number or alpha, the effect is the same. Dialogue Manager is almost type-agnostic, it treats everything as an alpha unless the value "looks" like a number in which case it will dealt with as such, by default.
In addition, D12.2 automatically sticks a comma for every 3rd significant digit so the "C" modifier is unnecessary.