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     [CLOSED] Keepdefines

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Keepdefines
 Login/Join
 
Silver Member
posted
Hi All

I'm getting (FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED:
HOLD.HOLD.DEALER_COST ERROR while using SET KEEPDEFINES = ON IN 7.7 Environment,But Working fine with 7.6 Environment.
 -* File Test_keepdefines.fex
SET KEEPDEFINES = ON

TABLE FILE CAR
PRINT MODEL
   BODYTYPE
   FUEL_CAP
   MPG
BY COUNTRY
BY CAR
ON TABLE HOLD AS TOTPORT FORMAT FOCUS INDEX COUNTRY
END

TABLE FILE CAR
PRINT WHEELBASE DEALER_COST HEIGHT
BY COUNTRY
BY CAR
ON TABLE HOLD AS ALLROWS FORMAT FOCUS
END

JOIN COUNTRY IN ALLROWS TO COUNTRY IN TOTPORT AS J4

TABLE FILE ALLROWS
PRINT WHEELBASE DEALER_COST HEIGHT
BY COUNTRY
BY CAR
ON TABLE HOLD 
END

TABLE FILE CAR
PRINT SALES LENGTH WIDTH RETAIL_COST
BY COUNTRY
BY CAR
ON TABLE HOLD AS DETLPERF
END

DEFINE
FILE DETLPERF
HOLDINGPERIOD/I3 = 1;
END

MATCH
FILE HOLD
PRINT WHEELBASE DEALER_COST HEIGHT
BY COUNTRY
BY CAR
RUN

FILE DETLPERF
PRINT SALES LENGTH WIDTH RETAIL_COST
BY COUNTRY
BY CAR
AFTER MATCH HOLD OLD
END

DEFINE
FILE HOLD
BMVWO/D19.2 = DEALER_COST - RETAIL_COST;
EMVWO/D19.2 = HEIGHT - LENGTH;
CFLWO/D19.2 = DEALER_COST - SALES;
END

TABLE FILE HOLD
SUM DEALER_COST RETAIL_COST BMVWO EMVWO CFLWO
COMPUTE DIFFERENCE/D10.2 = DEALER_COST + CFLWO;
BY COUNTRY
BY CAR
BY SALES
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD FORMAT FOCUS
END

DEFINE FILE HOLD
SAL/D19.2 = BMVWO - SALES;
END

TABLE FILE HOLD
PRINT DEALER_COST RETAIL_COST BMVWO EMVWO CFLWO SAL
BY COUNTRY
BY CAR
END

-*SET KEEPDEFINES= OFF

 


Thanks,
PR

This message has been edited. Last edited by: Kerry,


Release: Webfocus 7.6.11
OS/Platform: Windows
Output: HTML, EXL2K
 
Posts: 32 | Registered: October 29, 2010Report This Post
Master
posted Hide Post
Have you tried giving the HOLD file explicit name instead of just HOLD?

Might help.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
In this particular example, KEEPDEFINES serves no practical purpose. But it should also not result in this error message. The purpose of the command, from the manual:
quote:
The KEEPDEFINES parameter determines if a virtual field created by the DEFINE command for a host or joined structure is retained or cleared after the JOIN command is run. It applies when the DEFINE command precedes the JOIN command.
In this example there is no define before the join, so the command has no meaning.
If you want the error to be clarified, I'd advise to open a case with IB tech support.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
<JG>
posted
The explanation is very simple and it is due to KEEPDEFINES doing exactly what it should

your code creates a binary format hold file called HOLD

This creates a hold file with filename HOLD and segment name HOLD
hence HOLD.HOLD.DEALER_COST

You then create a DEFINE on this HOLD which is kept in memory (as a fully qualified name)

You then create FOCUS format hold file
so HOLD.HOLD.DEALER_COST no longer exists in the HOLD.MAS file because for a FOCUS DB the filename is HOLD
but the segment name is SEG01 meaning the fully qualified fieldname is HOLD.SEG01.DEALER_COST

It's just simple bad prctice to reuse hold file names in that way.

The fact that it did not give the error previously is due to code tightnig. Really it should of.

quote:

SET KEEPDEFINES = ON

DEFINE FILE DETLPERF
HOLDINGPERIOD/I3 = 1;
END

MATCH
FILE HOLD
PRINT WHEELBASE DEALER_COST HEIGHT
BY COUNTRY
BY CAR
RUN
FILE DETLPERF
PRINT SALES LENGTH WIDTH RETAIL_COST
BY COUNTRY
BY CAR
AFTER MATCH HOLD OLD
END

DEFINE FILE HOLD
BMVWO/D19.2 = DEALER_COST - RETAIL_COST;
EMVWO/D19.2 = HEIGHT - LENGTH;
CFLWO/D19.2 = DEALER_COST - SALES;
END

TABLE FILE HOLD
SUM DEALER_COST RETAIL_COST BMVWO EMVWO CFLWO
COMPUTE DIFFERENCE/D10.2 = DEALER_COST + CFLWO;
BY COUNTRY
BY CAR
BY SALES
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD FORMAT FOCUS
END

DEFINE FILE HOLD
SAL/D19.2 = BMVWO - SALES;
END

TABLE FILE HOLD
PRINT DEALER_COST RETAIL_COST BMVWO EMVWO CFLWO SAL
BY COUNTRY
BY CAR
END

 
Report This Post
Silver Member
posted Hide Post
Thanks.. got an Idea of what happens when the KEEPDEFINES is ON.. and I'm not getting the error when the KEEPDEFINES taken out or if we give explicit name instead of just HOLD..
can you please give me an Idea of what happens when the KEEPDEFINES is 'OFF' and the reason why it works..

PR

This message has been edited. Last edited by: pvparuc,


Release: Webfocus 7.6.11
OS/Platform: Windows
Output: HTML, EXL2K
 
Posts: 32 | Registered: October 29, 2010Report This Post
<JG>
posted
A good place to start would be by reading the manual.

It's quite clearly documented.
 
Report 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     [CLOSED] Keepdefines

Copyright © 1996-2020 Information Builders