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     [SOLVED] No of rows from a hold to be used in a query later on in a .fex

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] No of rows from a hold to be used in a query later on in a .fex
 Login/Join
 
Platinum Member
posted
I want to use the value of the number of rows that are in a hold file later on in another query in the same .fex. Is this doable?

Thanks Trudy

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


WF8
Windows
 
Posts: 117 | Registered: May 28, 2015Report This Post
Platinum Member
posted Hide Post
Yep, it's possible.

I have an example I had to create that used a SUM, but the concept is the same just using COUNT instead.

 
-*get the sum of the records out of hold into hold
TABLE FILE HOLDEVERYTHINGDIST
SUM
     HOLDEVERYTHINGDIST.SEG01.CLOSED_ALL_REQUESTS AS 'CLREQS'
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLDCLOSEDTOTALS FORMAT FOCUS
END

-*set the amper variable using READFILE
-DEFAULTH &CLREQS = 0
-RUN
-READFILE HOLDCLOSEDTOTALS
-TYPE CLREQS IS &CLREQS

 


Once you have that amper value set then you can use it at your leisure after that. I will note it is imperative that the column in the hold file and the amper variable carry the same EXACT name. Otherwise it won't work.

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


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Platinum Member
posted Hide Post
Hi Trudy,

Here's an example using the CAR file. It creates 2 hold files and stores the record count in DM variables that can be used later in the fex.

-*
TABLE FILE CAR
PRINT CAR
BY COUNTRY
ON TABLE HOLD AS HLD_H01
END
-SET &H01_CNT = &LINES;
-RUN
TABLE FILE CAR
PRINT MODEL
BY COUNTRY
BY CAR
ON TABLE HOLD AS HLD_H02
END
-SET &H02_CNT = &LINES;
-RUN
-TYPE ***************************
-TYPE H01_CNT ----- &H01_CNT
-TYPE H02_CNT ----- &H02_CNT
-TYPE ***************************
-RUN


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Platinum Member
posted Hide Post
Thank you both for the examples, I got this working.


WF8
Windows
 
Posts: 117 | Registered: May 28, 2015Report 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     [SOLVED] No of rows from a hold to be used in a query later on in a .fex

Copyright © 1996-2020 Information Builders