If the data is processed by a REXX routine after the sort anyway,
why not do this transformation before the sort with another REXX routine?
Should be a piece of cake ...
Then the sort ...
and if the leading zeroes indeed need to be removed again, you can do this
in the REXX routine which runs after the sort.
If the file is not very large, even the sorting can be done by clever usage
of a REXX stem variable ... put the whole thing in a REXX stem, do all the
modifications and sorting there and put it out in the desired format and
order.
I've done this very often even on Windows, to get readable reports out of
unstructured test data ...
BTW: 35th birthday of REXX some days ago ... many thanks to Mike Cowlishaw !
Kind regards
Bernd
Am 16.04.2014 16:26, schrieb John Gilmore:
This thread is giving me a bit of trouble.
An IPA is internally a four-byte unsigned binary integer. By
convention it is formatted externally as a sequence of four unsigned
decimal integers separated by dots and with 'insignificant' leading,
leftmost zeros suppressed. Each byte can of course have a decimal
value d in the open interval 0 <= d <= 255. The IPA from which I am
sending this is, for example,
24.62.42.175
InN order to make it sortable lexicographically just one operation is
required: any and all short, less that three-digit, byte values need
to be padded out on the left to three digits with zeros. For my IPA
doing so yields
024.062.042.175
This operation is doable, if need be, in RPG; and it is of course
doable in any adult programming language, readily for example in
COBOL.
Why all the pother?
John Gilmore, Ashland, MA 01721 - USA
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN