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     [WORKAROUND] How to Read values from Foccache Table

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[WORKAROUND] How to Read values from Foccache Table
 Login/Join
 
Gold member
posted
I have a foccache table called customer_id that stores 3 values: Customer Type, Customer ID, Customer Name.

I am trying to use the following code to retrieve the "Customer ID" from a procedure that I am using to populate long and latitudes for a specific customer.

  
FILEDEF CUSTOMER_IDS DISK FOCCACHE/CUSTOMER_IDS.FTM
-RUN
-READ CUSTOMER_IDS  &CUST_ID.A100. 
-RUN

-TYPE &CUST_ID
-RUN
-EXIT


The following code produces "000008Customer". However what is stored in the foccache table is

Customer Type = Customer
Customer ID = 770
Customer Name = "(confidential)"

How can I read this foccache table properly?

Thank you

This message has been edited. Last edited by: Joey Sandoval,




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro


 
Posts: 94 | Location: Austin, TX | Registered: August 08, 2012Report This Post
Virtuoso
posted Hide Post
You may need to store your FOCCACHE file with:

ON TABLE SAVE AS CUSTOMER_IDS
or
ON TABLE HOLD AS CUSTOMER_IDS FORMAT ALPHA  

Also, make sure your customer fields are not variable length.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
As you are on 7.7.03 you can now use READFILE -

-DEFAULTH &COUNTRYV='', &CAR='', &MODEL='', &RETAIL_COST=0
DEFINE FILE CAR
  COUNTRYV/A20V = COUNTRY;
END
TABLE FILE CAR
  SUM RCOST
   BY COUNTRYV
   BY CAR
   BY MODEL
ON TABLE HOLD AS FOCCACHE/CARHOLD
END
-RUN
-READFILE CARHOLD
-REPEAT :Loop WHILE &IORETURN EQ 0;
-TYPE &COUNTRYV &CAR &MODEL &RETAIL_COST
-READFILE CARHOLD
-:Loop

Because the -READFILE is using the synonym to read the values, the variable aspect is taken care of for you.

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
Gold member
posted Hide Post
Thank you Tony. I was able to read the value in my development folder. But when I try it from a procedure in Managed Reporting, it is prompting me for the variable that I am trying to read..




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro


 
Posts: 94 | Location: Austin, TX | Registered: August 08, 2012Report This Post
Guru
posted Hide Post
Take a look at the properties for your .fex and uncheck the ;Prompt for parameters' box.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Gold member
posted Hide Post
Thank you all for your input. I was actually able to avoid using a READ command by just doing an inner join with the foccache table and the table needed.

Thank you




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro


 
Posts: 94 | Location: Austin, TX | Registered: August 08, 2012Report 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     [WORKAROUND] How to Read values from Foccache Table

Copyright © 1996-2020 Information Builders