Bernd,

The REXX processing after sort is not as much a transformation as it is a 
search for the next available value from an IP block.

- Vignesh
Mainframe admin

On Apr 16, 2014 6:24:08 PM, Bernd Oppolzer <[email protected]> wrote:

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

MARKSANDSPENCER.COM
________________________________
 Unless otherwise stated above:
Marks and Spencer plc
Registered Office:
Waterside House
35 North Wharf Road
London
W2 1NW

Registered No. 214436 in England and Wales.

Telephone (020) 7935 4422
Facsimile (020) 7487 2670

www.marksandspencer.com

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please let us know 
and then delete it from your system; you should not copy, disclose, or 
distribute its contents to anyone nor act in reliance on this e-mail, as this 
is prohibited and may be unlawful.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to