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



Bob cozzi wrote:
Hans,
If myself and others hadn't protested the original plan for right justifying
text in a field and strongly suggest using EVALR instead of the original
plan, we would have ended up with something like this:

| > parms.transNo = %editc((%dec(transNo:%size(transNo):0) + 1):'X');

RPG programmers do not want to write parsers, compilers, editors, regexp
search tools, etc. They want to move field A to field B as easily as
possible. If that means it needs to be converted between character and
numeric, then that's the way it is. For example, I'm currently contracting at a shop where their item number is
stored in at least 6 different field formats, sometimes it is character,
occasionally it is numeric; often with different field lengths. This is due
to the vastness of the application and the different staff members working
on it over the last 20 years. That fact that I may have to code something like the above over and over
again, is just not practical and does nothing to get the old programmers
into the new RPG IV stuff. If they could just do this:
Eval A = B
EvalR A = B
Or
EVAL A = %Char(numfield:*NOZEROSUPRESSION)
They would say, okay I can do that.


(Obviously, I'm joking about the *NOSEROSUPRESSION option.)
-Bob


Bob: I know what you're saying. But as I've suggested previously, when you're dealing with legacy apps, you do what's consistent with those apps, and use newer techniques only when convenient. For example, I've never suggested using /FREE calcs in legacy apps. The newer functionality is really best kept in new apps.

We're getting more and more off subject, but this reminds me of a great song recorded by Brave Combo, "Always Vienna". Here's the applicable verse:

   There is a house of cards
   Where castles stood
   Now we call it home
   Sometimes we have to burn old houses down
   Ashes fuel our dreams

For many apps, you reach a point where trashing everything and starting fresh from scratch is a better alternative than maintaining the old "house of cards".

If you have a legacy app with item numbers stored in at least 6 different formats, well, that's a design decision you're going to have to deal with. That is, if you don't have the luxury of scrapping everything and starting over. Starting over gives you the opportunity to structure things right, right from the start. And doing things right also should better prepare the app for future changes.

So sure, perhaps newer language enhancements can't be easily integrated with the old legacy stuff, and is better suited to new applications. If we catered new enhancements more towards the legacy apps, then those who write new apps would complain. Ultimately, isn't it a more reassuring message that we expect more new apps to be written in RPG?

Cheers! Hans



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.