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



On 7/19/2014 12:26 AM, John Yeung wrote:
I hope you'll forgive my ignorance and help me understand something.
Does C++ allow you to take full advantage of the native features due
to it being an ILE language?

ILE features are one nice thing about it, but certainly not the only thing. Consider these points:

IBMs ILE C++ for IBM i is a native language, much like RPG. There's an embedded SQL precompiler that you can use to make it easy to code sQL, much like RPG. It's precompiler isn't quite as nice as the RPG one, but it's a whole lot easier to code than doing database calls via an API like CLI/ODBC/JDBC, etc.

IBM added native record I/O support to ILE C/C++, so you can do the same sort of record I/O you can do in RPG.

IBM gives C/C++ easy access to using MI functions and CL commands. (Easier, in fact, than in RPG.)

It uses the native IBM i error handling methods of sending error messages to call-stack level message queues that can propagate up the call stack, as all IBM i languages (OPM or ILE) do. Messages get placed in the job log where they are kept as diagnostics for people who want to read them. I love this feature of the OS, and it's not really there for languages that run under PASE like Java, PHP or Ruby. (Some languages have similar exception systems built-in, but it doesn't apply to the entire job in that case, it only applies to calls within that particular program. I.e. the exception system in, for example, Java works nicely but isn't as nice as one that's built into the OS instead of just the language runtime.)

It has ILE features. Of course.

It has support for CCSIDs, et al, to handle all the sorts of character sets that you might want/need to work with. (It does this part better than RPG does.)

It supports "real decimal" numbers, i.e. packed and zoned instead of resorting to something like floating point. Java supports decimal numbers with a set of classes, but to me that makes it much more cumbersome to work with vs. a primitive data type. (Note that only on IBM i does C/C++ support this stuff...)

That's off the top of my head.

Or do you just mean it allows you to easily call IBM system APIs? Or
is it something else about the language, or about IBM's
implementation of the language, apart from ILE features?

Hmmm... never really thought of that, but calling system APIs easily is another good thing about the C/C++ environment.

Really it's IBM's particular implementation of the language that I like. C++ on Unix or Windows doesn't excite me nearly as much.


For example, which of the following would you say takes better
advantage of native features: (1) non-ILE RPG, or (2) ILE C++? I
could easily see the answer being (1), because even RPG III had
unbeatable integration with the underlying DB2 database. But maybe
there are things about ILE that are even more pervasive or compelling.

I'd say both "non-ILE RPG" (as you put it) and ILE C++ have strong integration with the native OS features. ILE C++ has pretty much all of the features that OPM RPG has, native database support, et al... but also has access to those feature only available in the ILE environment. So i'd say ILE C++ wins.

But it's not really because of ILE itself. I mean, ILE really just gives you the ability to have procedures ("functions" in other languages) that can be stored in different objects and called... Big deal, EVERY language in the world has some implementation of that. (Except the OPM ones like RPG/400, et al.)

But, it's the deeper integration with the features of IBM i that I prefer over other OSes.

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.