|
Comments inline...
-----Original Message----- message: 1 date: Thu, 03 Aug 2006 16:08:13 -0500 from: Booth Martin subject: Re: Spam:Re: Even more embedded SQL.... Thank you EVERYBODY (one lastthing) That sounds like filters to me, then sorting. This sounds like a doozy. Best of luck with it. :) Alan Shore wrote:Let me just say that the idea behind this project took the user 2hours(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.Couldbe one cluster. (Category/Sub-category) All the items that are over 7 inches tall, over 4 inches wide. Couldbeanother 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 definiteentitythat the user wants. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShoreBooth MartinToSent by: RPG programming on the AS400
/
rpg400-l-bounces@ iSeries<rpg400-l@xxxxxxxxxxxx>midrange.comccSubject08/03/2006 04:09 Re: Spam:Re: Even moreembeddedPM SQL.... Thank you
EVERYBODY
(one lastthing)Please respond toRPG programmingon the AS400 /iSeries<rpg400-l@midrange.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 thatthecluster 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
seemultiple records on the screen. With the user having the ability to sort the data down in whateverwaythey desire, it will help them to "cluster" like items together, sothatthey 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 howimportantthat this e-mail group/list is in pooling knowledge. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShoreBooth MartinToSent by: RPG programming on the AS400
/
rpg400-l-bounces@ iSeries<rpg400-l@xxxxxxxxxxxx>midrange.comcc Subject08/03/2006 03:47 Re: Spam:Re: Even moreembeddedPM SQL.... Thank you EVERYBODY(one lastthing)Please respond toRPG programmingon the AS400 /iSeries<rpg400-l@midrange.com>A subfile has a limit of 9999 records. Its easy to program to stopatthat limit, but really, at that point a subfile has little use.Thatswhy I suggested a filter earlier. Later I saw your post where theusersneed 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 processallof 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 recordfile toaload-all subfile. Using Debug, it errors out on the 10,000threcord tothesubfile. Making changes as you suggested resulted in the program errors outonthe10,000th record to the subfile. Oh well. Never mind Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore Michael_Schutte@ Sent by:Torpg400-l-bounces@ RPG programming on the
AS400
/midrange.com iSeries<rpg400-l@xxxxxxxxxxxx>cc08/03/2006 02:27SubjectPM Re: Spam:Re: Even moreembeddedSQL.... Thank you EVERYBODY(onelastthing) Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com>Thanks, I've never used it, but I "wrongly" assumed that it was designed
so
thatyou could do more than 9,999 records. "Crispin Bates"ToSent by: "RPG programming on theAS400 /rpg400-l-bounces@ iSeries"<rpg400-l@xxxxxxxxxxxx>midrange.comcc Subject08/03/2006 02:13 Re: Spam:Re: Even moreembeddedPM SQL.... Thank you EVERYBODY(onelastthing) 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 be5S0 ifused for these keywords. But, it also quite explicitly states thatthemaximum number of records in a subfile is 9999. Crispin. ----- Original Message ----- From: <Michael_Schutte> 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 theoption inSDA. If you use program-to-system field you must define the
field
inthecontrol records dspecs. You will create this field just as youwouldfora hidden field but instead of using an H, you would use a P. Thebiggestyou 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
willsee this screen. Work with Fields Record . . . : C1 Type information, press Enter. Number of fields to roll . . . . . . . . . . . . . . . . . .6Type options, change values, press Enter. 1=Select keywords 2=Edit comments 4=Delete field Option Order Field Type Use Length Row/Col RefConditionOverlap 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 withthesamename as I used above. In the RPG program, you will then Eval SFLSIZE = *HIVAL or
99999
Alan ShoreToSent by: RPG programming on the
AS400
/rpg400-l-bounces@ iSeries<rpg400-l@xxxxxxxxxxxx>midrange.comcc Subject08/03/2006 12:35 Re: Even more embeddedSQL....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 aload allsub-file? Please (and I stress please) be more forthcoming Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore Michael_Schutte Sent by:Torpg400-l-bounces@ RPG programming on the
AS400
/midrange.com iSeries<rpg400-l@xxxxxxxxxxxx>cc08/03/2006 12:27SubjectPM Re: Even more embeddedSQL....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 willallowyouto create 99,999 records. Alan ShoreToSent by: RPG programming on the
AS400
/rpg400-l-bounces+ iSeries<rpg400-l@xxxxxxxxxxxx>michael_schutte=@midra nge.comSubjectRe: Even more embeddedSQL....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 mutualmind-meldmode or something. I want to take time to thank everyone who has replied to myquestion,withsuggestions, ideas, thoughts, other questions and especiallyexamples.I think I have a handle on everything that I need in relation towhatisrequired for SQL and Dynamic sort building, but what bothers me
is
theposition to aspect of SQL, where the file data is rebuilt, with
the
firstrecord being equal to or greater than the value that was
requested
tobepositioned to. The problem of paging up from that point (before
the
firstrecord) 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
next9,999 records etc. etc. If the user wants to position to a value AND its within this
9,999
NOPROBLEM If its outside the range , recreate the data and load theapplicable9,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 fieldwhichisin effect equal in size to ALL the fields CONCATENATED. This
field
wouldnow be the key of the file, and depending upon what sort isrequired,build this field accordingly for example if the sort is COL1, COL2, COL3, COL4, COL5, COL6, COL7, the thiskeyfield is created as COL1 concat COL2 concat COL3 concat COL4 concat COL5 concat COL6concatCOL7 and then use regular RPG to handle the page up, page down,position topage-at-a-time sub-file Anybody any thoughts on either of these 2 ideas? Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore Booth MartinToSent by: RPG programming on the
AS400
/rpg400-l-bounces@ iSeries<rpg400-l@xxxxxxxxxxxx>midrange.comcc Subject08/03/2006 11:40 Re: Even more embeddedSQL....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 placebeforethe process starts, or at any time in the process. Let the usersetthefilters with an F-key. Point out to the users the problems itsolvesfor them, and I believe they will get on board. "I want all of
zip
code12345 sorted by color" becomes a breeze to do. If they will filter so that the number of records of interestremainsbelow about 2500 records then you can do a load-all into an arrayandthe 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
pullthe subfile up or down one record at a time with no codingrequired onyour part. (Yes, thats right. One record at a time up or down.Pieceof cake.) Alan Shore wrote:That's one thing I'm still playing around with in my head. I'vetalkedwiththe 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 beeasiertocode for. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore Booth MartinToSent by: RPG programming on theAS400 /rpg400-l-bounces+ iSeries<rpg400-l@xxxxxxxxxxxx>alanshore=@midrange.comSubjectRe: Even more embeddedSQL....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,willthefirst record of the new subfile be the first record of the fieldvaluein record 1 of the subfile? Lets say I have a subfile sorted by year and the first displayedrecordhappens to have a value of "White" in the color column. When Iclickthe color column does my new subfile start with "White" or withthelowest 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 besorted(ascending/descending) based upon whatever combination of the 7columnstheuser wants, hence the Dynamic sort. The order by of the SQLstatementwillhave to be dynamically built. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore Booth MartinToSent by: RPG programming on theAS400 /rpg400-l-bounces@ iSeries<rpg400-l@xxxxxxxxxxxx>midrange.comcc Subject08/03/2006 10:21 Re: Even more embeddedSQL....AM Please 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
the
columnheaded "Color". Do you want the 15 items shown by column
"year"
tobesorted by color, or so you want all 15000 records sorted by
color
first,then by year? (Also, clicking the sort column a second time could present thesamedata in reverse order (ascending vs. descending) Alan Shore wrote:Thanks for your reply Michael, but I think you misunderstandwhat Iamlooking for. If my screen is displaying 7 different columns, the user wantsto 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 statementbaseduponthe request of the user. So as per my original request if anyone can help me, I am looking for an example of embeddedSQLandDynamic Sorting Subfiles - Page at a time (with the ability to
position
to aparticular 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 Michael_Schutte Sent by:Torpg400-l-bounces@ RPG programming on theAS400/midrange.com iSeries<rpg400-l@xxxxxxxxxxxx>cc08/03/2006 09:53SubjectAM Re: Even more embeddedSQL....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
to
orderbyaspecific field based on the user selection. Alan ShoreToSent by: RPG programming on theAS400/rpg400-l-bounces@ iSeries<rpg400-l@xxxxxxxxxxxx>midrange.comccRPG programming on theAS400/iSeries<rpg400-l@xxxxxxxxxxxx>,08/03/2006 09:53rpg400-l-bounces@xxxxxxxxxxxxAMSubjectEven more embeddedSQL....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 anynumberofdifferent columns. So I thought to myself, this smacks of embedded SQL and DynamicSortingSubfiles. The unfortunate thing is that the data I have to display is over 15,000recordslong(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
of
data)"Some title for an article huh? If anyone has an example ofwhat isrequired, or could point me in some direction, I would be very grateful. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore -- 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)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
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)
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) digest 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. End of RPG400-L Digest, Vol 5, Issue 882 ****************************************
I chose this one to comment on because it was the first in this thread to fill an entire digest all by itself. If you scrolled down this far, you get an idea of what all of the digest subscribers see when posts aren't trimmed. Please trim posts. Please? Thank you. Sign me A dizzy-from-scrolling digest user p.s. I think I managed also to cut all e-mail addresses out, even ones that had been partly mangled due to line-breaks, etc. __________________________________________________________________ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.