George,

I don't understand....  Your default sort order doesn't make sense to me.
An alpha field in EBCDIC would sort numeric digits to the bottom of the
list.  Your 0A records would normally come before the 01......  This would
seem to be supported by the results you mentioned when you made the key
descend.

Try ALTSEQ(QSYS/QASCII) to make the system weigh the key values as if they
were ascii (so that numeric digits sort before characters).


Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863



-----Original Message-----
From: George Kinney [mailto:GKinney@xxxxxxxxxxxxxxxx]
Sent: Thursday, March 18, 2004 12:14 PM
To: 'midrange-l@xxxxxxxxxxxx'
Subject: Trouble with ALTSEQ


This is got me stuck at the moment, most likely its just me, but I can't
sort this out.

I've got a file, with an index field that has values like:
01001
01002
etc

and is alphanumeric, so it goes:
09999
0A000
0A001

And this index needs to be read in a descending order (newest -> oldest).

Problem is the default sort order is :
0-9
A-Z

which leads to:
09999
09998
...many skipped
0A002
0A001

and needs to be:
0A002
0A001
0A000
09999
09998
etc.

I can't just drop the DESCEND keyword on the index, 'cause the newer numbers
will begin drifting towards the middle of the list, instead of the top.

I found the ALTSEQ keyword, figured it fit the bill, and created a *SRTSEQ
table, changed the sort weights to put the 0-9 characters after the A-Z
chars, and rebuilt the file. (crtpf file(test) srcfile(qddssrc)
srtseq(*src))

And it didn't matter. The index is still in the same order.

Arrrgh!

Can anyone shed some light on this for me?  Am I missing a step? Completely
off base? 

----------------------------------------------
George Kinney
System Coordinator / NEX IS 
NEX Transport, Inc.
gkinney@xxxxxxxxxxxxxxxx
----------------------------------------------
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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