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     Generating a List of Numbers

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Generating a List of Numbers
 Login/Join
 
<Trevor>
posted
I want to take a file of data and append to the front a number starting at 1 and incrementing by 1 upto 500.

However, I can't find how to do it !

Any suggestions ?
 
Report This Post
Platinum Member
posted Hide Post
Try this:
define file filename
numbr/i3=last numbr + 1;
end
tablef file filename
print numbr *
end
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Report This Post
Platinum Member
posted Hide Post
Would LIST accomplish this for you?

TABLE FILE CAR
LIST CAR
END

Ken
 
Posts: 177 | Location: Calgary, Alberta, Canada | Registered: April 25, 2005Report This Post
Expert
posted Hide Post
trevor, you want to add a field to the beginning of your database? and the field will have values from 1 to however many records there are in the file? is that it?
if so, then k.lane's solution is perfect..the LIST verb will itemize your records.
TABLE FILE whatever
LIST *
will print every rec, every var, with a new field in position 1.
But if that's not what you want, then you're in the world of MacGyver , if you want to create a list of numbers out of thin air.
Let us know which it is.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Steve Cowell>
posted
Trevor. One thing to be aware of when using LIST is your BY fields. The list vlue will restart at one each time a change in the BY field is encountered. The easy solution is to TABLE your file, SORT and HOLD, then TABLE the HOLD file and LIST *.
Also HOLD FORMAT FOCUS, will insert a sequential FOCLIST value to make sure that it creates a unique key for each record, this can be used for the same purpose assuming that the sort order is correct.
Hope this helps.
 
Report 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     Generating a List of Numbers

Copyright © 1996-2020 Information Builders