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



I've done this over flat files but maybe it's not an option in your environment.
could you build a LF over the flat file, define the fields and key the ones you want?
A FIELD1 I SST(FLATFIELD 1 10)
A FIELD2 I SST(FLATFIELD 11 20)
A FIELD3 I SST(FLATFIELD 21 30)
A FIELD4 I CONCAT(FIELD1 FIELD4)
A K FIELD1

you could still do sorting with sql over any of the other fields.



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Rick.Chevalier@xxxxxxxxxxxxxxx
Sent: Tuesday, September 13, 2011 2:19 PM
To: midrange-l@xxxxxxxxxxxx
Subject: QLGSORT and CPF3BD6 - Key field 01 is not valid for key number 1

I have been banging my head against this message for a couple of hours now
without any success.

I am trying to sort a flat file based on positions in the record and defined
lengths. Specifically, the output of a Unix list directory command piped to
an output file. I found several examples of sorting subfiles but none
sorting flat files. I did make some discoveries and have made tweaks based
on what I found but I still keep coming up with this error.

This is the relevant code (I think) http://code.midrange.com/84149fae5e.html
Rick Chevalier
Sr. Programmer/Analyst | Software Solutions - Loan Servicing
[cid:image001.gif@01CC721F.21A1B460]
817-525-7178 (w)

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.