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



One other thing that hasn't been pointed out by anybody else yet....

If you've got a set of 10, or 100, or 1000, or xxxxxx rows to insert and you
are inserting them one at a time using OBDC, the performance will always be
poor.

You should take a look at doing a block insert.  Check the archives for more
info.


Charles


> -----Original Message-----
> From: afvaiv [mailto:afvaiv@xxxxxxxxxx]
> Sent: Friday, June 11, 2004 4:12 PM
> To: RPG programming on the AS400 / iSeries
> Subject: Re: Howto use fields "by name"
> 
> 
> I'm afraid that's not the case, since ALL sentences are just 
> INSERTs, so
> I don't thing an index or view or whatever will do any good to its
> performance. Or, maybe, am I wrong?
> Antonio
> 
> DeLong, Eric escribio':
> 
> >Has anyone done any performance tuning on the SQL statement 
> being run?
> >Chances are, most of the performance problems can be tied to missing
> >indexes, which the SQL query optimizer will report to you if 
> you run the job
> >in debug mode.  For ODBC connections, there is a check box 
> on the ODBC
> >datasource dialog that runs the connection job in debug mode.
> >
> >Eric DeLong
> >Sally Beauty Company
> >MIS-Project Manager (BSG)
> >940-898-7863 or ext. 1863
> >
> >
> >
> >-----Original Message-----
> >From: afvaiv [mailto:afvaiv@xxxxxxxxxx]
> >Sent: Friday, June 11, 2004 1:43 PM
> >To: RPG programming on the AS400 / iSeries
> >Subject: Re: Howto use fields "by name"
> >
> >
> >Charles, thanks for your answer.
> >I know I could just run the SQL statement. In fact it comes 
> from an ODBC
> >connection which is behaving too slow under some 
> circunstances, and we
> >got some changes, store it in the IFS as a set of 
> statements, copy them
> >to a plain, flat file, in a file, and now I'd like to run 
> them "on the
> >fly" directly. If I use dynamic SQL results, I fear, will be 
> as slow (or
> >even worse) they were when executed directly under ODBC...
> >Any other suggestions?
> >Antonio.
> >
> >CWilt@xxxxxxxxxxxx escribio':
> >
> >  
> >
> >>Wouldn't it be easier just to the run the SQL statement?  
> You could even
> >>change the INSERT into an UPDATE if need be.
> >>
> >>Besides which, I'm pretty sure the answer to you question.  
> You can't
> >>    
> >>
> >update
> >  
> >
> >>a field given the fieldname stored in a variable (at least 
> in RPG).  Look
> >>    
> >>
> >in
> >  
> >
> >>the archives and you should find some discussions along 
> these lines.  Most
> >>will recommend you simple use dynamic SQL.
> >>
> >>HTH,
> >>
> >>Charles
> >>
> >>
> >> 
> >>
> >>    
> >>
> >>>-----Original Message-----
> >>>From: afvaiv [mailto:afvaiv@xxxxxxxxxx]
> >>>Sent: Friday, June 11, 2004 8:45 AM
> >>>To: RPG400-L
> >>>Subject: Howto use fields "by name"
> >>>
> >>>
> >>>Folks,
> >>>I don't know if the following can be done or not.
> >>>I'm reading a file, whose records contain SQL sentences like
> >>>"INSERT INTO xxxxx (fielda, fieldh, fieldx) VALUES 
> ('aaaaa',18,'xyz');
> >>>
> >>>I want to be able to
> >>>- parse that sentence,
> >>>- read the field names in a loop, into a variable that will 
> >>>contain one 
> >>>field name at a time
> >>>- read the new values in same loop, into a variable that 
> will contain 
> >>>one value at a time
> >>>
> >>>now comes the question:
> >>>
> >>>I would have to do a lot of  "case" sentences, or nested 
> >>>"if's" so that 
> >>>in the end I could either MOVE or EVAL each field to its new 
> >>>value. The 
> >>>question is: since I will have the field name as the value 
> >>>contained in 
> >>>a variable called "FieldName",
> >>>can I do some kind of   Eval   of the real field to the 
> >>>desired value, 
> >>>addressing the field by the name contained in FieldName?
> >>>
> >>>I hope I made it clear enough.
> >>>
> >>>Any examples or hints?
> >>>TIA
> >>>
> >>>-- 
> >>>Antonio Fernandez-Vicenti
> >>>afvaiv@xxxxxxxxxx
> >>>
> >>>
> >>>--
> >>>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.
> >>>
> >>>   
> >>>
> >>>      
> >>>
> >>--
> >>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.
> >>
> >>
> >> 
> >>
> >>    
> >>
> >
> >  
> >
> 
> -- 
> Antonio Fernandez-Vicenti
> afvaiv@xxxxxxxxxx
> 
> 
> --
> 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 ...


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.