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

Reply via email to