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     Help with another Define

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Help with another Define
 Login/Join
 
Gold member
posted
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


Rob M.
Target Corporation

WF 7.1.4
 
Posts: 73 | Location: Minneapolis, MN | Registered: August 08, 2007Report This Post
Virtuoso
posted Hide Post
quote:
T_PROD_POLINE.ACCOUNTNUM EQ '693017' OR T_PROD_POLINE.ACCOUNTNUM EQ '693002' OR ACCOUNT NUM EQ


There appears to be a space between ACCOUNT and NUM in the line above.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Gold member
posted Hide Post
quote:
Originally posted by Leah:
quote:
T_PROD_POLINE.ACCOUNTNUM EQ '693017' OR T_PROD_POLINE.ACCOUNTNUM EQ '693002' OR ACCOUNT NUM EQ


There appears to be a space between ACCOUNT and NUM in the line above.


Thanks, I scanned it quickly a few times and didn't even see that.


Rob M.
Target Corporation

WF 7.1.4
 
Posts: 73 | Location: Minneapolis, MN | Registered: August 08, 2007Report This Post
Expert
posted Hide Post
Rob,

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, 2004Report This Post
Platinum Member
posted Hide Post
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.

DEFINE FILE T_PROD_PO
DATETODAY/HYYMDS=HGETC(10, DATETODAY);
POAGE/D5=HDIFF(DATETODAY, ORDERDATE, 'DAY', POAGE);
GROUPNAME/A30= DECODE T_PROD_POLINE.ACCOUNTNUM
('693001' 'HOUSEKEEPING'
'693016' 'HOUSEKEEPING'
'693010' 'HOUSEKEEPING'
'693006' 'EXTERIOR/HORIZONTAL SERVICES'
'650151' 'EXTERIOR/HORIZONTAL SERVICES'
'693007' 'EXTERIOR/HORIZONTAL SERVICES'
'693005' 'EXTERIOR/HORIZONTAL SERVICES'
'693020' 'EXTERIOR/HORIZONTAL SERVICES'
'657009' 'EXTERIOR/HORIZONTAL SERVICES'
'650127' 'GM/VTRAN'
'657020' 'GM/VTRAN'
'637000' 'GM/VTRAN'
'650124' 'INTERIOR & EXTERIOR FINISHES'
'657030' 'INTERIOR & EXTERIOR FINISHES'
'657007' 'INTERIOR & EXTERIOR FINISHES'
'650132' 'INTERIOR & EXTERIOR FINISHES'
'693040' 'WATER/WASTE/PEST'
'657010' 'WATER/WASTE/PEST'
'693017' 'WATER/WASTE/PEST'
'693002' 'WATER/WASTE/PEST'
'650160' 'WATER/WASTE/PEST'
'693009' 'WATER/WASTE/PEST'
'693008' 'DIRECT SALES/PRODUCTION'
'650126' 'HVAC'
'651000' 'REFRIGERATION'
'678100' 'SECURITY & PROTECTION'
'651100' 'SECURITY & PROTECTION'
'651200' 'SECURITY & PROTECTION'
'693004' 'SECURITY & PROTECTION'
'657006' 'ELECTRICAL & LIGHTING'
'657008' 'ELECTRICAL & LIGHTING'
'657011' 'ELECTRICAL & LIGHTING');

Ira
wf 538 aix 533


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
 
Posts: 195 | Registered: October 27, 2006Report This Post
Virtuoso
posted Hide Post
I support the use of DECODE, or even better put this codes and translations into an external file and use that file to "decode"

(there are so many ways to do this.....)




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Platinum Member
posted Hide Post
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


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
 
Posts: 195 | Registered: October 27, 2006Report 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     Help with another Define

Copyright © 1996-2020 Information Builders