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




Hi Charles
Yes I understand that if the sort is changed, the position to will have to
reflect that sort.
I never said that this project would be easy.
I've not had much dealings with processing a user space, so that might be
wort looking into



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx


                                                                       
             "Wilt, Charles"                                           
             <CWilt@xxxxxxxxxx                                         
             om>                                                        To
             Sent by:                  "RPG programming on the AS400 / 
             rpg400-l-bounces@         iSeries" <rpg400-l@xxxxxxxxxxxx>
             midrange.com                                               cc
                                                                       
                                                                   Subject
             08/03/2006 12:47          RE: Even more embedded SQL....  
             PM                        Thank you EVERYBODY             
                                                                       
                                                                       
             Please respond to                                         
              RPG programming                                          
              on the AS400 /                                           
                  iSeries                                              
             <rpg400-l@midrang                                         
                  e.com>                                               
                                                                       
                                                                       




-----Original Message-----
From: rpg400-l-bounces+cwilt=meaa.mea.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+cwilt=meaa.mea.com@xxxxxxxxxxxx] On
Behalf Of Alan Shore
Sent: Thursday, August 03, 2006 12:25 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Even more embedded SQL.... Thank you EVERYBODY


Booth - you and I must be on the same wavelength, or in
mutual mind-meld
mode or something.
I want to take time to thank everyone who has replied to my
question, with
suggestions, ideas, thoughts, other questions and especially examples.

I think I have a handle on everything that I need in relation
to what is
required for SQL and Dynamic sort building, but what bothers me is the
position to aspect of SQL, where the file data is rebuilt,
with the first
record being equal to or greater than the value that was
requested to be
positioned to. The problem of paging up from that point
(before the first
record) will mean yet another re-creation.
So I was thinking of a couple of things
1/. Load the first 9,999 records into a load all sub-file.
If the user wants to go above that, recreate the data and
load the next
9,999 records etc. etc.
If the user wants to position to a value AND its within this 9,999 NO
PROBLEM
If its outside the range , recreate the data and load the
applicable 9,999
records into the sub-file.

"Position to" with a load-all subfile?  How are you going to do that?
Save the subf RRN and key so you can have a particular page put back
out.

Have you thought about the effect that having multiple sortable columns
would have?  If the results are sorted by color, then as a user I'd want
to position to a color.  If the results are sorted by name, then I'd
want to position to by name.


2/. Create a file (via DDS) with all the fields defined
COL1, COL2, COL3, COL4, COL5, COL6, COL7 and an additional
field which is
in effect equal in size to ALL the fields CONCATENATED. This
field would
now be the key of the file, and depending upon what sort is
required, build
this field accordingly
for example
if the sort is COL1, COL2, COL3, COL4, COL5, COL6, COL7, the
this key field
is created as
COL1 concat COL2 concat COL3 concat COL4 concat COL5 concat
COL6 concat
COL7
and then use regular RPG to handle the page up, page down, position to
page-at-a-time sub-file
Anybody any thoughts on either of these 2 ideas?



The problem with this idea is that DB I/O is pretty expensive.  You'd
get much better performance writing to a user space instead.

HTH,



Charles Wilt
--
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


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.