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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Variables
 Login/Join
 
Member
posted
Is there a way a field value can be moved into a variable? I'm trying to move a counter field to a variable so that I can use the -IF command to create a loop depending on the counter.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 16 | Registered: August 08, 2016Report This Post
Virtuoso
posted Hide Post
You'll have to use HOLD FORMAT ALPHA to write it to disk and use -READ to read it into an &VARIABLE.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
TABLE FILE CAR
COUNT MODEL AS MODEL_COUNT
ON TABLE HOLD AS H001
ON TABLE SET ASNAMES ON
END
-RUN

-READFILE H001

-TYPE MODEL COUNT: &MODEL_COUNT


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
I tried doing that but it keeps the last counter number. My situation is I have hold file and each record has a different counter. I want to move this counter for each record into a variable. Is this possible?

I am trying to produce a list of student who have holds. Some students have 1 hold, while others have more than 1. How can I have the report list only the number of holds each student has? The output needs to be in XML format.


WebFOCUS 8
Windows, All Outputs
 
Posts: 16 | Registered: August 08, 2016Report This Post
Virtuoso
posted Hide Post
I'm at a loss how these variables will then be used. Could you give us a report spec? Maybe there's a different way of doing this that won't involve variables.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
Alma,
Try this:
  
TABLE FILE CAR
COUNT MODEL AS M
BY COUNTRY
ON TABLE HOLD AS H001
ON TABLE SET ASNAMES ON
END
-RUN
-SET &C=&LINES;
-REPEAT #GET FOR &I FROM 1 TO &C;
-READFILE H001
-SET &M.&I=&M;
-#GET

This gives you variables &M1, &M2 etc. containing the counts of models per country


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Depending on what you are doing, another option would be to hold the counters and then use a DECODE to pull the wanted number.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Thank you for your suggestions. Danny-SRL, it worked! Thank you!


WebFOCUS 8
Windows, All Outputs
 
Posts: 16 | Registered: August 08, 2016Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders