× 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.



Hi Rob,

From what I remember, you have to load the table in an ascending order when you specify the Ascending keyword.

You cannot use SQL to do this, as this is a working storage variable. Of course if the data is coming from a file into the variable, you can use the Order By phrase to sort the file first.

For AS/400 reference, you may find this website handy:
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm

Hope this helps,

JP

Robert Munday wrote:
I need to sort a table by one of its elements which should be easy enough. There are no experienced COBOL programmers in this shop and my only book example is non-iSeries. SEU is hanging up on my sort statement.

Here is what I have:

01 SL415-CB-Work-Table. 04 CB-Table-Ctr Pic 99 Value Zero.
04 CB-Work-Table-Entry Occurs 50 Ascending Key Is CB-Past-Due Indexed By CB-Index. 06 CB-Past-Due Pic X(3). 06 CB-SSN Pic X(9). 06 CB-Ln-Num Pic XX. 06 CB-Account-Status Pic XX.
The editor chokes on this:

Sort CB-Work-Table-Entry On Ascending Key CB-Index.

What to do? I'd buy an iSeries COBOL book but I'm outahere at the end of the month. I could also do this in SQL if I knew how.

Thanks,



Robert Munday
Munday Software Consultants
Montgomery, AL
on assignment in Columbia, SC



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.