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.
Mirza, if there's no common field, how would you determine which value from of FIELD_B to use? is it a constant? if so, easy. you read out that value into an &var and then use that &var in your calculations in table1. TABLE FILE CAR SUM SALES ON TABLE HOLD AS SAVETHIS FORMAT ALPHA END -*CHECK FILE SAVETHIS -RUN -READ SAVETHIS &MYSALES.I6 ...now you have an &VAR containing your table2 value and you can use this in defines and computes when you read table 1. Make sure you know the length of your held field before you try to read it back in. Thats why i threw that check command in there.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Sorry, I guess I should have clarified a bit further. The fields that I wish to calculate are summed fields.
For example TABLE 1 contains the total number of SALES only. TABLE 2 contains the total number of PRODUCTS only. There is no way to join the two tables because a common field does not exist in these tables.
I've tried your solution, but I get the parameter prompt for MYSALES. I think I understand what your telling me, in that insert the summed value in a parameter but I'm not sure how to do that, or call that parameter value.
When you say total number of sales and total number of products, what other fields might exist. If is any relationship at all, you could pull all of the products sort by a 'caluclated/defined' field, pull all the sales sort by a 'calculated/defined' field. Then join the two to do your calculated/defined field if you can create a common calculated/defined field.
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
You can dummy out tht prompt by -SET &MYSALES = 0 ; before you run. then DEFINE FILE SOMEFILE NEWVALUE/I8= &MYSALES / 2 ; END you can use this &var a zillion ways. As Leah suggests, a compute is an option. or you can even use it in a column header. TABLE FILE SOMEFILE PRINT SOMETHING AS 'value is &MYSALE '
(ps Tex's way, below, is the classic cool way, most flexible, imho)
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003