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



uuumm. RPG send a escape message, which provide immidiate attention to the user that the program is not function properly. If user took option c, all open files and locks are automatically closed and released. If a programmer is contacted, programmer can start a sevice job and jump into the program thru debugger to look at value of all variables or takes option D to dump the program. How do you do that in java?

I'm not understanding the example you given. If a file is open/lock by another job, there is no way for a java or RPG program to close it.


Steve, you cannot simply pick a few features that java has and say that RPG is inferior to java. If it is that easy, I can do the same and say the java is inferior to RPG because:
1) java does not support F spec. In RPG, you easily read/update/write record to a file by simply add a F spec.
2) You cannot use a simple statement like this in java to assign the value of a int variable to a decimal variable: myDecimalVariable = myIntVariable.
3) You cannot use a simple statement like this in java to concate 5 different char strings variable myNewString = string1+string2+string3+string4+string5.
4) RPG allows function parameter to pass by value/const/reference.
5) By adding Bnddir('QC2LE') in the H spec, RPG can easily call function in c standard lib.

Steve,
1) *PSSR or CPF0000 is what one can use to catch all errors.
2) In RPG, you can call CEERTX to register a method to call at end of program (Not exactly the same, but is similar to the finally in java)
3) Garbage collector is a bit overrated in RPG arena. Memory leak hardly ever happen in RPG.
4) When using monitor in RPG, on-error (<= without specify error condition) catches all error.

________________________________

From: rpg400-l-bounces@xxxxxxxxxxxx on behalf of Steve Richter
Sent: Wed 6/18/2008 11:50 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Is RPG 'DEAD"



On Wed, Jun 18, 2008 at 12:19 PM, Lim Hock-Chai
<Lim.Hock-Chai@xxxxxxxxxxxxxxx> wrote:
Personally, I think java's try/catch is so overrated. What do you do when you catch an
error?

close files, release the locks, ...

someone posts here a question about "resource unavailable" that is
related to an IFS file that cant be opened. The cause being another
job which has neglected to close the IFS file it opened. try finally
blocks eliminate this class of problem in your applications.
--
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.