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



Thank you for your suggestion.  We're open to much.  Even if new logicals
are required (arrgh - native RPG!).  Joe, judging by many of your past
posts I don't think you can find a use for SQL anywhere.  You also left out
the 11 eval's for moving the fields from one name to another.  But how
could you know there were that many.  And the hassle if someone adds a
field to both of the files, (gotta go change this program).  And the
groundless phobia that rpg programmers have about using the same field name
in more than one file.

Rob Berendt

==================
A smart person learns from their mistakes,
but a wise person learns from OTHER peoples mistakes.



                    "Joe Pluta"
                    <joepluta@PlutaBrot       To:     <midrange-l@midrange.com>
                    hers.com>                 cc:
                    Sent by:                  Fax to:
                    midrange-l-admin@mi       Subject:     RE: SQL vs V5R1 and 
service woes
                    drange.com


                    09/05/2001 02:38 PM
                    Please respond to
                    midrange-l






C/EXEC SQL
C+ insert into plline2
C+                               (select * from vdline2 where
C+                                                           (vdlpo conca
C+ t h2item) in (select (pdlpo concat plitem) from plline))
C/END-EXEC

or even

C/EXEC SQL
C+ insert into plline2
C+ (select * from vdline2 a where exists (select * from
C+ plline b where a.vdlpo = b.pdlpo and a.h2item = b.plitem))
C/END-EXEC



The equivalent code in RPG:

          READ VDLINE2               90
*IN90     DOWEQ*OFF
VDKEY     SETLLPLLINEL1              91
*IN91     IFEQ *ON                       If in PLLINE
          WRITEPLLINE2R                  Write to PLLINE2
          ENDIF
          READ VDLINE2               90
          ENDDO

Easier to read, and my initial guess is that the RPG runs a bit quicker.

Maybe I'm daft, but I just don't understand why someone would write SQL for
code like this.

Joe

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.







As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.