|
Let me just say that the idea behind this project took the user 2 hours (without interruption) to explain what he wanted. The way it will be "clustered" could be as follows All the items that are red, over 7 inches tall, over 4 inches wide. Could be one cluster. (Category/Sub-category) All the items that are over 7 inches tall, over 4 inches wide. Could be another cluster (Category/Sub-category) That's right, One item can be in multiple clusters. So the ability to sort the data by different "columns" is a definite entity that the user wants. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx Booth Martin <booth@xxxxxxxxxx om> To Sent by: RPG programming on the AS400 / rpg400-l-bounces@ iSeries <rpg400-l@xxxxxxxxxxxx> midrange.com cc Subject 08/03/2006 04:09 Re: Spam:Re: Even more embedded PM SQL.... Thank you EVERYBODY (one lastthing) Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> Your last comment is echoed by me regularly. There's no new problems, just problems we haven't seen yet. Someone has though, and has solved it already. This is a good place to meet that guy or gal. Let me see if I understand your problem. When you say "cluster like items" the idea of filtering comes screaming out of the air at me. Your users don't care about the order within the cluster; only that the cluster be like-stuff. All the red ones, all the tall ones, all the broke ones, etc. Is that what you are saying? Alan Shore wrote:
Sorry Booth, I already suggested that. The user needs the ability to see multiple records on the screen. With the user having the ability to sort the data down in whatever way they desire, it will help them to "cluster" like items together, so that they can choose like items for the same Category/Sub-Category. Like I said before, I didn't say that this project was easy. However, I hope nobody misconstrues any of my remarks, because the responses I have received from EVERYBODY, has shown me just how important that this e-mail group/list is in pooling knowledge. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx
Booth Martin
<booth@xxxxxxxxxx
om>
To
Sent by: RPG programming on the AS400 /
rpg400-l-bounces@ iSeries <rpg400-l@xxxxxxxxxxxx>
midrange.com
cc
Subject
08/03/2006 03:47 Re: Spam:Re: Even more embedded
PM SQL.... Thank you EVERYBODY
(one lastthing)
Please respond to
RPG programming
on the AS400 /
iSeries
<rpg400-l@midrang
e.com>
A subfile has a limit of 9999 records. Its easy to program to stop at that limit, but really, at that point a subfile has little use. Thats why I suggested a filter earlier. Later I saw your post where the users need to process all the records. Well, ok. But they aren't going to process 65,000 in one sitting. If they really are going to process all of the records, one after another, why display 10 at a time, anyway? Display them one record at a time, and allow the page keys to page up and down through the main file, one record at a time? Then, have the various possible sorts set on by F-key(s) and use logicals as was suggested by someone earlier. Alan Shore wrote:I just created a quick and dirty program to read a 65,500 record file toaload-all subfile. Using Debug, it errors out on the 10,000th record tothesubfile. Making changes as you suggested resulted in the program errors out on
the
10,000th record to the subfile. Oh well. Never mind Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxxMichael_Schutte@bobevans.comSent by:Torpg400-l-bounces@ RPG programming on the AS400 /midrange.com iSeries <rpg400-l@xxxxxxxxxxxx>cc08/03/2006 02:27SubjectPM Re: Spam:Re: Even more embeddedSQL.... Thank you EVERYBODY (onelastthing)Please respond toRPG programmingon the AS400 /iSeries<rpg400-l@midrange.com>Thanks, I've never used it, but I "wrongly" assumed that it was designed so that you could do more than 9,999 records. "Crispin Bates" <cbates@xxxxxxxxx et>ToSent by: "RPG programming on the AS400 / rpg400-l-bounces@ iSeries" <rpg400-l@xxxxxxxxxxxx> midrange.comccSubject08/03/2006 02:13 Re: Spam:Re: Even more embedded PM SQL.... Thank you EVERYBODY (one lastthing) Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> Michael, The DDS Manual specifies that a program to system field should be 5S0 if used for these keywords. But, it also quite explicitly states that the maximum number of records in a subfile is 9999. Crispin. ----- Original Message ----- From: <Michael_Schutte@xxxxxxxxxxxx> To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> Sent: Thursday, August 03, 2006 12:43 PM Subject: Spam:Re: Even more embedded SQL.... Thank you EVERYBODY (onelastthing)In the control record. You can chose to enter "Records in subfile" ornamea field in "Program-to-system field" by putting an "8" as the option in SDA. If you use program-to-system field you must define the field inthecontrol records dspecs. You will create this field just as you wouldfora hidden field but instead of using an H, you would use a P. The biggest you can define this field is 5, 0 (it may be the only size that you can specify). Define Display Layout Subfile control record . . . . . . . . . : C1 Type values, press Enter. Keyword Number Records in subfile . . . . . . . . . . SFLSIZ Program-to-system field . . . . . . SFLSIZE Records per display . . . . . . . . . SFLPAG 14 Spaces between records . . . . . . . . SFLLIN F3=Exit F12=Cancel Once you've specified the field in the screen above put a 12 on the control record to edit the screen. Then press F4 to work with fields. You will see this screen. Work with Fields Record . . . : C1 Type information, press Enter. Number of fields to roll . . . . . . . . . . . . . . . . . . 6 Type options, change values, press Enter. 1=Select keywords 2=Edit comments 4=Delete field Option Order Field Type Use Length Row/Col Ref Condition Overlap 10 MYSFLRRN S P 5,0 20 *DATE C 6,0 01 002 30 *TIME C 6,0 01 013 40 SDPROGRAM A O 10 01 059 50 SFLRRN S H 5,0 60 RECLOC A H 10 More... Add H Hidden Add M Message Add 10 sflsize P 5,0 Program-to-system F3=Exit F6=Sort by row/column F12=Cancel You see in the bottom,I've entered a program to system field with thesamename as I used above. In the RPG program, you will then Eval SFLSIZE = *HIVAL or 99999 Alan Shore <AlanShore@xxxxxx om>ToSent by: RPG programming on the AS400 / rpg400-l-bounces@ iSeries <rpg400-l@xxxxxxxxxxxx> midrange.comccSubject08/03/2006 12:35 Re: Even more embedded SQL.... PM Thank you EVERYBODY (one last thing) Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> Michael - as William Shakespear once said "What The @#$%^& are you talking about?" Could you be more explicit. Are you saying that there is a way to load 99,999 records to a load all sub-file? Please (and I stress please) be more forthcoming Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx Michael_Schutte@b obevans.com Sent by:Torpg400-l-bounces@ RPG programming on the AS400 / midrange.com iSeries <rpg400-l@xxxxxxxxxxxx>cc08/03/2006 12:27SubjectPM Re: Even more embedded SQL.... Thank you EVERYBODY (one last thing) Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> I believe that you can use a program-to-system field that will allow
you
to create 99,999 records. Alan Shore <AlanShore@xxxxxx om>ToSent by: RPG programming on the AS400 / rpg400-l-bounces+ iSeries <rpg400-l@xxxxxxxxxxxx> michael_schutte=bccobevans.com@midra nge.comSubjectRe: Even more embedded SQL.... Thank you EVERYBODY 08/03/2006 12:25 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> 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,withsuggestions, 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 thefirstrecord being equal to or greater than the value that was requested to
be
positioned to. The problem of paging up from that point (before thefirstrecord) 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 applicable9,999records into the sub-file. 2/. Create a file (via DDS) with all the fields defined COL1, COL2, COL3, COL4, COL5, COL6, COL7 and an additional field whichisin 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? Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx Booth Martin <booth@xxxxxxxxxx om>ToSent by: RPG programming on the AS400 / rpg400-l-bounces@ iSeries <rpg400-l@xxxxxxxxxxxx> midrange.comccSubject08/03/2006 11:40 Re: Even more embedded SQL.... AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> May I make a suggestion here? A small, but very helpful step might be to put filters in place before the process starts, or at any time in the process. Let the user set
the
filters with an F-key. Point out to the users the problems it solves for them, and I believe they will get on board. "I want all of zip code 12345 sorted by color" becomes a breeze to do. If they will filter so that the number of records of interest remains below about 2500 records then you can do a load-all into an array and the sorting becomes a piece of cake. Heck, it even allows a scroll
bar,
which really is wonderful if for no other reason than that they can
pull
the subfile up or down one record at a time with no coding required on your part. (Yes, thats right. One record at a time up or down. Piece of cake.) Alan Shore wrote:That's one thing I'm still playing around with in my head. I've talkedwiththe user, and even he's not sure what he wants here. I'm leaning more towards starting from the beginning of the file (Nomatterhow its sorted, for each RE-SORT)as I'm pretty sure this will be
easier
tocode for. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx Booth Martin <booth@xxxxxxxxxx om>ToSent by: RPG programming on the AS400 / rpg400-l-bounces+ iSeries <rpg400-l@xxxxxxxxxxxx> alanshore=nbty.coccm@xxxxxxxxxxxxSubjectRe: Even more embedded SQL.... 08/03/2006 10:40 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> So, then, when the user clicks on the other column, say color, will
the
first record of the new subfile be the first record of the field value in record 1 of the subfile? Lets say I have a subfile sorted by year and the first displayed
record
happens to have a value of "White" in the color column. When I click the color column does my new subfile start with "White" or with the lowest color alpha value, say... "Amaretto" or "Blue" or "Cyan"? Alan Shore wrote:Thanks Booth The answer is for the WHOLE data (ALL 15,000 records) to be sorted (ascending/descending) based upon whatever combination of the 7columnstheuser wants, hence the Dynamic sort. The order by of the SQL statementwillhave to be dynamically built. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx Booth Martin <booth@xxxxxxxxxx om>ToSent by: RPG programming on the AS400 / rpg400-l-bounces@ iSeries
<rpg400-l@xxxxxxxxxxxx>
midrange.comcc Subject08/03/2006 10:21 Re: Even more embedded SQL.... AMPlease respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com>What if you present data by, say, year. Then the user clicks thecolumnheaded "Color". Do you want the 15 items shown by column "year" to
be
sorted by color, or so you want all 15000 records sorted by colorfirst,then by year? (Also, clicking the sort column a second time could present the same data in reverse order (ascending vs. descending) Alan Shore wrote:Thanks for your reply Michael, but I think you misunderstand what Iamlooking for. If my screen is displaying 7 different columns, the user wants to beableto sort the data by ANY combination of those columns for example Col1, Col2, Col3, Col4, Col5, Col6, Col7 and then (by magic) the same data by Col7, Col6, Col5, Col4, Col3, Col2, Col1 AND THEN Col6 Or maybe Col5, Col6, Col1 This would mean building the ORDER BY within the SQL statement baseduponthe request of the user. So as per my original request if anyone can help me, I am looking for an example of embedded SQLandDynamic Sorting Subfiles - Page at a time (with the ability to position to a particular piece of data) However - Michael, I will still look up your suggestion Thanks in advance Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx Michael_Schutte@b obevans.com Sent by:Torpg400-l-bounces@ RPG programming on the AS400
/
midrange.com iSeries<rpg400-l@xxxxxxxxxxxx>cc08/03/2006 09:53SubjectAM Re: Even more embedded
SQL....
Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> Look in the archives for uses of the CASE statement. I don'tremembertheexact syntax at this time, but you can use the case statement toorderbyaspecific field based on the user selection. Alan Shore <AlanShore@xxxxxx om>ToSent by: RPG programming on the AS400
/
rpg400-l-bounces@ iSeries<rpg400-l@xxxxxxxxxxxx>midrange.comccRPG programming on the AS400
/
iSeries<rpg400-l@xxxxxxxxxxxx>,08/03/2006 09:53 rpg400-l-bounces@xxxxxxxxxxxx AMSubjectEven more embedded SQL.... Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> Hi All, I have been given a project that requires the need to display,withinasubfile, the data from 2 separate files with the ability to sort that data from any numberofdifferent columns. So I thought to myself, this smacks of embedded SQL and Dynamic Sorting Subfiles. The unfortunate thing is that the data I have to display is over 15,000 recordslong(andgrowing) so if anyone can help me, I am looking for an example of embedded SQL andDynamicSorting Subfiles - Page at a time (with the ability to position to a particular piece ofdata)"Some title for an article huh? If anyone has an example of what is required, or could point me in some direction, I would be very grateful. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx -- This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing
listTo 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. -- This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing
listTo 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.-- ----------------------------- Booth Martin www.martinvt.com ----------------------------- -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo 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.-- ----------------------------- Booth Martin www.martinvt.com ----------------------------- -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo 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.-- ----------------------------- Booth Martin www.martinvt.com ----------------------------- -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo 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. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo 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. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo 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. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo 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. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo 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.-- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo 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. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailinglistTo 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.-- ----------------------------- Booth Martin www.martinvt.com ----------------------------- -- 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.
-- ----------------------------- Booth Martin www.martinvt.com ----------------------------- -- 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 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.