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


  • Subject: Re: Sorting an OVERLAY array.
  • From: "Wayne Achenbaum" <wache@xxxxxxxxxxx>
  • Date: Thu, 29 Mar 2001 11:20:31 -0500

Hi Aaron, If I understand you correctly, all you have todo is have a 8s
field ie TXSEQLIN starting at position 1. Then in your Rpgle do a SORTA
TXLINSEQ
Hence sorting a overlayed array is no different than any other  array being
sorted, but in an overlayed array all the other parts are sorted along with
it.
The one thing you can't do easily is Sort TXSEQ in ascending and TXLIN is
descending and vice versa.

Hopes this helps
Wayne Achenbaum
Slomin's Inc.

----- Original Message -----
From: Bartell, Aaron L. (TC) <ALBartell@taylorcorp.com>
To: <RPG400-L@midrange.com>
Sent: Thursday, March 29, 2001 9:49 AM
Subject: Sorting an OVERLAY array.


> Here is an array that I need sorted first by TXSEQ and then by TXLIN.  How
> would I go about doing that?
>
> D                 DS                              INZ
>
> D TXData                       126    DIM(TXSize)
>
> D  TXSEQ                         4S 0 OVERLAY(TXData)     Detail Line
Number
>
> D  TXLIN                         4S 0 OVERLAY(TXData:5)   Text Seq Number
>
> D  TXTXT                       100    OVERLAY(TXData:9)   Text
>
> D  TXFONT                        5    OVERLAY(TXData:109) Font Id
>
> D  TXINK                        10    OVERLAY(TXData:114) Ink Color
>
> D  TXPNT                         3    OVERLAY(TXData:124) Point Size
>
> I am basically wondering if there is an opcode that will sort an array for
> me.  If not I suppose I will have to sort them myself.
>
> Any help is greatly appreciated,
>
> Aaron Bartell
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
david@midrange.com
> +---

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.