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



I really like how Java does this.

SQLString = 'SELECT * FROM LIB/FILE WHERE CUSTNO=' + CustNo

Statement stmt = con.createStatement(); // create the statement on the 400
ResultSet rs = stmt.executeQuery(sqlString); // execute the statement on the
400

         while (rs.next()) // process result set
         {
           System.out.println(rs.getInt("CUSTNO"));
         }
So in the new free format RPG you cannot have the SQL free format?

You know there is a lot that RPG could learn from Java.  And in the same
breath vice versa:-)

Aaron Bartell

-----Original Message-----
From: R. Bruce Hoffman, Jr. [mailto:rbruceh@attglobal.net]
Sent: Thursday, September 06, 2001 9:00 AM
To: rpg400-l@midrange.com
Subject: Re: Free format vs SQL


-----Original Message-----
From: Buck Calabro <Buck.Calabro@commsoft.net>
To: rpg400-l@midrange.com <rpg400-l@midrange.com>
Date: Thursday, September 06, 2001 9:52 AM
Subject: RE: Free format vs SQL


>Perhaps you could propose a standard whereby you wrap the SQL in a
>procedure?  I know; it sounds lame.
>       dow sqlcod=*zeros;
>       count=*zeros;
>       sqlcod=getPllineCount(VDLPO: COUNT)

or at least a subroutine... just not in-line SQL.

and no, the procedure isn't lame, it just requires more lines of code (for
the prototype) and since SQL host variables are global, it sometimes seems
like overkill to use a procedure when a subroutine will do...

===========================================================
R. Bruce Hoffman, Jr.
 -- IBM Certified Specialist - AS/400 Administrator
 -- IBM Certified Specialist - RPG IV Developer

"America is the land that fought for freedom and then
  began passing laws to get rid of it."

     - Alfred E. Neuman



_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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-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.