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.
When I try to do the following define I get the following error message:
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: NUM (FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: NUM
What is wrong? Why is it cutting off ACCOUNT in the ACCOUNTNUM?
DEFINE FILE T_PROD_PO DATETODAY/HYYMDS=HGETC(10, DATETODAY); POAGE/D5=HDIFF(DATETODAY, ORDERDATE, 'DAY', POAGE); GROUPNAME/A30= IF T_PROD_POLINE.ACCOUNTNUM EQ '693001' OR T_PROD_POLINE.ACCOUNTNUM EQ '693016' OR T_PROD_POLINE.ACCOUNTNUM EQ '693010' THEN 'HOUSEKEEPING' ELSE IF T_PROD_POLINE.ACCOUNTNUM EQ '693006' OR T_PROD_POLINE.ACCOUNTNUM EQ '650151' OR T_PROD_POLINE.ACCOUNTNUM EQ '693007' OR T_PROD_POLINE.ACCOUNTNUM EQ '693005' OR T_PROD_POLINE.ACCOUNTNUM EQ '693020' OR T_PROD_POLINE.ACCOUNTNUM EQ '657009' THEN 'EXTERIOR/HORIZONTAL SURFACES' ELSE IF T_PROD_POLINE.ACCOUNTNUM EQ '650127' OR T_PROD_POLINE.ACCOUNTNUM EQ '657020' OR T_PROD_POLINE.ACCOUNTNUM EQ '637000' THEN 'GM/VTRAN' ELSE IF T_PROD_POLINE.ACCOUNTNUM EQ '650124' OR T_PROD_POLINE.ACCOUNTNUM EQ '657030' OR T_PROD_POLINE.ACCOUNTNUM EQ '657007' OR T_PROD_POLINE.ACCOUNTNUM EQ '650132' THEN 'INTERIOR & EXTERIOR FINISHES' ELSE IF T_PROD_POLINE.ACCOUNTNUM EQ '693040' OR T_PROD_POLINE.ACCOUNTNUM EQ '657010' OR T_PROD_POLINE.ACCOUNTNUM EQ '693017' OR T_PROD_POLINE.ACCOUNTNUM EQ '693002' OR ACCOUNT NUM EQ '650160' OR T_PROD_POLINE.ACCOUNTNUM EQ '693009' THEN 'WATER/WASTE/PEST' ELSE IF T_PROD_POLINE.ACCOUNTNUM EQ '693008' THEN 'DIRECT SALES/PRODUCTION' ELSE IF T_PROD_POLINE.ACCOUNTNUM EQ '650126' THEN 'HVAC' ELSE IF T_PROD_POLINE.ACCOUNTNUM EQ '651000' THEN 'REFRIGERATION' ELSE IF T_PROD_POLINE.ACCOUNTNUM EQ '678100' OR T_PROD_POLINE.ACCOUNTNUM EQ '651100' OR T_PROD_POLINE.ACCOUNTNUM EQ '651200' OR T_PROD_POLINE.ACCOUNTNUM EQ '693004' THEN 'SECURITY & PROTECTION' ELSE IF T_PROD_POLINE.ACCOUNTNUM EQ '657006' OR T_PROD_POLINE.ACCOUNTNUM EQ '657008' OR T_PROD_POLINE.ACCOUNTNUM EQ '657011' THEN 'ELECTRICAL & LIGHTING'; END
One thing that I would recommend to you is to make your code "neat" so that when you have errors such as these you can hone in on them quickly and efficiently. If your coding methology is such that it becomes easy to read then your debugging will generally be easier as well.
Also think of ways that you can save yourself from repetative coding such as using INCLUDE files or, in the case above, using IN instead of multiple ORs -
GROUPNAME/A30 = IF T_PROD_POLINE.ACCOUNTNUM IN ('693001','693016','693010') THEN 'HOUSEKEEPING'
ELSE IF T_PROD_POLINE.ACCOUNTNUM IN ('693006','650151','693007','693005','693020','657009') THEN 'EXTERIOR/HORIZONTAL SURFACES'
ELSE IF T_PROD_POLINE.ACCOUNTNUM IN ('650127','657020','637000') THEN 'GM/VTRAN'
ELSE IF T_PROD_POLINE.ACCOUNTNUM IN ('650124','657030','657007','650132') THEN 'INTERIOR & EXTERIOR FINISHES'
ELSE IF T_PROD_POLINE.ACCOUNTNUM IN ('693040','657010','693017','693002','650160','693009') THEN 'WATER/WASTE/PEST'
ELSE IF T_PROD_POLINE.ACCOUNTNUM IN ('693008') THEN 'DIRECT SALES/PRODUCTION'
ELSE IF T_PROD_POLINE.ACCOUNTNUM IN ('650126') THEN 'HVAC'
ELSE IF T_PROD_POLINE.ACCOUNTNUM IN ('651000') THEN 'REFRIGERATION'
ELSE IF T_PROD_POLINE.ACCOUNTNUM IN ('678100','651100','651200','693004') THEN 'SECURITY & PROTECTION'
ELSE IF T_PROD_POLINE.ACCOUNTNUM IN ('657006','657008','657011') THEN 'ELECTRICAL & LIGHTING';
As for the error, I think Leah hit it right on the head!!
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Leah is right on the mark. Tony's suggestion to clean it up makes it much easier to debug things when they are aligned. An alternate possibility is using decode (keeping in mind its limitations.
Frank, agreed. Because the limitation in external files is something like (or used to be) 32,000 bytes - whereas and pairs of decodes greater than 32 require an 'else' pointing back to the first decode etc. Ira aix 533 wf 538