While I'm sure FMTDTA is fine, it sounds like it wouldn't be all that
hard to read the whole flat file into an array and sort it in memory.
Yeah, you would need to do a little finagling (perhaps with data
structures and overlays) to set up the key, but it doesn't strike me
as particularly hairy.
More straightforward is probably creating a keyed PF with the desired
fields and dumping the flat file into that. (Or the SQL equivalent.)
There are so many ways to skin this cat. If you have access to the
Unix box that's generating this, there are plenty of tools there for
sorting. If you must do all your processing on the AS/400, there is
always my favorite, iSeries Python.
But if you're not using those already, it's probably because you're
not familiar with them, and thus you are stuck in a similar position
as with FMTDTA: needing to do a bunch of reading to figure it out. I
think the sweet spot in terms of effort, complication, and total time
to implement (including learning if necessary) is the PF or SQL-based
approach.
John
As an Amazon Associate we earn from qualifying purchases.
This thread ...
RE: QLGSORT and CPF3BD6 - Key field 01 is not valid for key number 1, (continued)
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.