Can't you sort the data before you put it in the table?
Regards
Ravi
                                                                           
             Robert Munday                                                 
             <rwmunday@earthli                                             
             nk.net>                                                    To 
             Sent by:                  COBOL <cobol400-l@xxxxxxxxxxxx>     
             cobol400-l-bounce                                          cc 
             s@xxxxxxxxxxxx                                                
                                                                   Subject 
                                       [COBOL400-L] Sorting A Table        
             06/06/2008 07:22                                              
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
             COBOL Programming                                             
                  on the                                                   
               iSeries/AS400                                               
             <cobol400-l@midra                                             
                 nge.com>                                                  
                                                                           
                                                                           
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
--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at 
http://archive.midrange.com/cobol400-l.
As an Amazon Associate we earn from qualifying purchases.