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
[RESOLVED] Looping
 Login/Join
 
Platinum Member
posted
I have a table that has a column called "remaining pmts number", and if run for certain collections of data, the max could be, say, 54. I need to build a file that has a row for 1 - n (n being the max "ramaining pmts number", but also includes values that do not appear in that collection. In other words, of the actual data does not have 14, 21 and 48 "remaining pmts number", I would still like to display those values. I believe I will need to do a loop to accomplish this, but I can't get the REPEAT command to work.

Can anyone help?

This message has been edited. Last edited by: Ted Michalski,


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Report This Post
Virtuoso
posted Hide Post
This is a job for McGuyver!


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
ted, basically what you're going to do is create a vector, a file, with just the numbers 1 thru 54, 54 rows, 1 value per row,...that you can do with looping and -WRITEs, or however you want. then you're going to join your data file to it, in such a manner that you get a row for all 54, some with values from your data extract, some without.
That's what the mcguyer technique is...(not just an 80s tv reference) ... and there are lots of articles on it, with sample code, on the Tips&Techniques articles section.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Here's an approach that doesn't require McGuyver.

SET HOLDLIST = PRINTONLY
-*
TABLE FILE xxx
 SUM MAX.remaining_pmts_number/I2
 ON TABLE HOLD AS NBRFILE FORMAT ALPHA
END
-RUN
-READ NBR_FILE &MAX_NUMBER.2.
-*
-REPEAT :ENDREPEAT1 FOR &I FROM 1 TO &MAX_NUMBER
-WRITE NBRFILE &I
-:ENDREPEAT1
-RUN
-*
TABLE FILE NBRFILE
PRINT *
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Platinum Member
posted Hide Post
Susannah, Dan, thanks for your input. I'll definitely try these.


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders