• Subject: Re: Sort Sequence on a LF
  • From: "Dan Bale" <dbale@xxxxxxxxxxx>
  • Date: Tue, 13 Jul 1999 11:44:32 -0400



John,

>>My pgm is reading through a LF and the data within the character field
(which is the key) is automatically being sorted :

a, A, 1, 10, 200, 21, etc . . .

Question : How can I change this sort sequence to sort :

*blanks, a, A,1, 10, 21, 200 ?<<

I think the only way you're going to get your desired results is to
right-justify the data in the character field; if you do this, you will be able
to use the normal sort sequence to get the results you're looking for.

BTW, store it right-justified, and you'll still be able to display/print it left
justified using the BIFs in RPG IV.

- Dan Bale





* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


This thread ...


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

This mailing list archive is Copyright 1997-2019 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].