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



RPG IV is a bit more complicated when writing CSV files...
     C                   eval      hIFS = csvOpen('/mydir/filename.csv': 
     C                                             'APLIB/CUSTMAST')
 
     C                   Read      CUSTMAST
     C                   return    csvWrite(hFile:CUSTDATA)


Perhaps not as clean a C++ but just as easy.
The thing is, and this is why I wrote the RPG xTools, a language with a
runtime library and add-on library of prewritten functions can do any of
those things "easily". 

-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Steve Richter
Sent: Thursday, March 24, 2005 4:06 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: RPG vs. Java vs. C++

On Thu, 24 Mar 2005 15:26:42 -0600, David Gibbs <david@xxxxxxxxxxxx> wrote:
> Joe Pluta wrote:
> > While I can't comment on your particular instance, in general (and this
> > is on just about nay platform), a compiled language will typically
> > outperform Java.  As far as the iSeries-AS/400 is concerned, because RPG
> > and the database are so tightly linked, it is almost impossible to write
> > business applications in any language that outperform well-written RPG
> > code.
> 
> I would add that you should use the right tool for the right job ...
> (and some will disagree with my next statement) ... writing a web app is
> harder in RPG than it is in Java (JSP) ... on the other hand, writing
> business logic is easier in RPG than it is in Java.
> 
> Writing any business application logic is harder in C / C++ than both
> RPG & Java.

Wow, strongly disagree on this David.

I have a c++ class in my windows code called CsvString. It is designed
to contain a string of comma seperated values.  Here is some code that
uses that class:
  CsvString  line ;
  line << "value1" ;
  line << "value2" ;
  line << 55 ;

that code adds three values to the comma seperated values string.  

Another class represents a text file in the file system. could easily
be a file you would write to the IFS.  Here is code that writes the
comma sep value string to the text file:
  TextFile orders ;
  orders.OpenNew( "c:\\directory\\filename.txt" ) ;
  orders << line ;

that is it.  the destructor of the TextFile class automatically closes
the file when class instance goes out of scope.

C++ can be the most readable language for business applications
available.  It all depends on how you use its features.

-Steve
-- 
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-Ups:
Replies:

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.