× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> The raw data is a file from Premenos. There is some simple filtering such
as
> an Active status, only want in this case 850's, and so on. So I created a
file
> out of this. Then in a different statement I do a Select Distinct, so as
to weed
> out dups. Now this Select Distinct prints out just the names. I would like
to
> provide a simple sequential number, w/ a total. Bear in mind, that this
simple
> report will likely grow into something far more interesting.

Excellent!  I have a much better idea where you're headed now.

Here's how I would do this in RPG.  (RPG because that's the list, and
becuase if will allow you to be maximally flexible - moreso than a simple
query.)

define a DS externally described, based on your work file

Declare a cursor
set counter to 1

loop
  fetch next into the DS
  exit loop if end of data
  increment counter
  print line, including counter
repeat
print total line, using last value of counter

  --buck




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.