× 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: Ordering records in a Join Logical
  • From: Pete Hall <pbhall@xxxxxxxxxx>
  • Date: Mon, 01 May 2000 22:18:46 -0500

At 11:42 05/01/2000 , Billy Rowe wrote:
>I've tried that keyword but it is only working to sequence records that
>have duplcate sequence values as in the previous record:
>
>Key 1  Key 2   Key 3         Key 4                   Key 5
>CMDIV TRSLICD TRNWSITID     TRDATETIME              TRTRNID
>  1     99893   900907   2000-04-21-07.22.00.000000  6786065
>  1     99893   914650   2000-04-18-19.13.00.000000  6718290
>  1     99893   914650   2000-04-19-17.04.00.000000  6744702
>  1     99893   914650   2000-04-20-23.37.00.000000  6776900
>  1     99893   914650   2000-04-22-11.54.00.000000  6810225
>  1     99893   914836   2000-04-18-15.07.00.000000  6713319
>  1     99893   921847   2000-04-18-08.44.00.000000  6703382
>  1     99893   921849   2000-04-18-08.58.00.000000  6703880
>  1     99880   913040   2000-04-17-20.12.00.000000  6690162
>  1     99893   909476   2000-04-21-20.40.00.000000  6800505
>  1     99893   910720   2000-04-17-10.13.00.000000  6677722
>  1     99893   910720   2000-04-19-19.00.00.000000  6746645
>  1     99893   910720   2000-04-20-23.16.00.000000  6776798
>  1     99893   910720   2000-04-22-14.41.00.000000  6811726
>  1     99893   914650   2000-04-21-15.31.00.000000  6796377
>
>
>
>The Key field is DIV it is the only one allowed because it is from
>the primary join file, the JDUPSEQ is specified for the other fields
>because they come from the other file.
>
>
>  A          R DIVJOINR                  JFILE( CUSP TRNP  )
>  A          J                           JOIN(  CUSP TRNP  )
>  A                                      JFLD(  CMCUSID TRCUSID )
>  A                                      JDUPSEQ( TRSLICID      )
>  A                                      JDUPSEQ( TRNWSITID     )
>  A                                      JDUPSEQ( TRDATETIME    )
>  A                                      JDUPSEQ( TRTRNID       )
>  A            CMDIVID
>  A            TRSLICID
>  A            TRNWSITID
>  A            TRDATETIME
>  A            TRTRNID
>  A            TRCLICID
>  A            TRSITID
>  A            TRTRNTYPE
>  A            TRQTY
>  A            TRMETAX
>  A            TRCUSPRC
>  A            TRRTLAMT
>  A            TRNWPRCAMT
>  A            TRBASECOST
>  A            TRCTPID
>  A            TRCUSID
>  A            TRNWBOARD
>  A            TRNWPRC
>  A            TRPRODID
>  A            CMNAME
>   *
>  A          K CMDIVID

Could you reverse the join? Then you could specify the full key. Since 
you're not using JDFTVAL, you're only going to get records that match in 
both files anyway. Failing that, you could use an SQL view, create an index 
over the view and use the index name in RPG. It is RPG??? I kinda think 
that SQL would just reverse the join though. If it didn't, it would have to 
make a copy of the data and then sort it, which may be a little on the 
sloooooow side.
Pete Hall
pbhall@execpc.com
http://www.execpc.com/~pbhall
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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 ...

Follow-Ups:
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.