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.
(FOC03665) Error loading external function 'TRUNCATE'This function can only be used in Dialogue Manager commands that support function calls, such as ‑SET and ‑IF commands. It cannot be used in ‑TYPE or ‑CRTFORM commands or in arguments passed to stored procedures.
You can't use it in a define statement. OR maybe you can based on Glenda's test but that's a numeric calculation she's doing so who knows.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
although it would take me more than a long nap to understand Glenda's DEFINE's... ( we need a smiley for head spinning out of control) if what you want to do is essentially ROUNDDOWN an end result, then you can write your own TRUNCATE function and stick it in your edasprof. eg:
-SET &ECHO = ALL ;
DEFINE FILE CAR
SALESTAX/D9.4 = .0825 ;
TAX/D9.4=SALES * SALESTAX;
temp1/I9=( TAX * 100) ;
rightanswer/P9.2=temp1/100;
wronganswer/P9.2= TAX;
END
TABLE FILE CAR
PRINT SALES SALESTAX TAX temp1 rightanswer wronganswer
COMPUTE OOPS/D9.2S=rightanswer - wronganswer;
ON TABLE HOLD AS MYTAB FORMAT HTMTABLE
END
-RUN
-STEP2
DEFINE FUNCTION F_TRUNC(number/D9.4)
temp1/I9= number * 100 ;
F_TRUNC/P9.2= temp1/100;
END
DEFINE FILE CAR
SALESTAX/D9.4 = .0825 ;
rightanswer/P9.2=F_TRUNC(SALES * SALESTAX);
END
TABLE FILE CAR
PRINT SALES SALESTAX rightanswer
ON TABLE HOLD AS MYTAB1 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
<TABLE><TR><TD>
!IBI.FIL.MYTAB;
<TD>!IBI.FIL.MYTAB1;
</TABLE>
-HTMLFORM END
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I was truncating character strings. Since I used TRUNCATE to concatenate First Name and Last Name Dialogue Manager variables, I thought I would modify the technique I use in a COMPUTE or DEFINE to use TRUNCATE instead of hard concatenation with a blank in between. But TRUNCATE only works in Dialogue Manager.
Cheers.
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