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



Looks to me like the issue here is
'What does CHAIN retreive when used on a file with duplicate keys.'
Long time ago I was told by IBM that the record retreived by the
CHAIN is unpredictable.
Experience tells that the retreival is FIFO.
Has anyone noticed anything other than the above.

Frank Kolmann


>To: rpg400-l@midrange.com
>From: "Mark Adkins" <adkinsm@amerch.com>
>
>I can't find any documentation that addresses this.
>
>If there is a table of order detail which has an index on Order #, and
UPC.
>Will these two pieces of code execute identically.
>
>1.   MYORD#    CHAIN     ORDDTL    99
>     *IN99          DOWEQ*OFF
>               <SOMECODE>
>     MYORD#    READE     ORDDTL          99
>               ENDDO
>
>2.   MYORD#    SETLL     ORDDTL
>     MYORD#    READE     ORDDTL          99
>     *IN99          DOWEQ*OFF
>               <SOMECODE>
>     MYORD#    READE     ORDDTL          99
>               ENDDO
>
>What if the index is not unique?  What if I set my pointer past the end of
>file before execution?
>
>Human logic dictates that a CHAIN should return the first occurrence of
the
>index which would be the smallest upc.  Computer implementation dictates
>that the CHAIN should return the first occurrence of MYORD# found via an
>algorithm.
>
>Mark




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.