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



Type command, press Enter.

===> VENT SOAPBOX(*MOUNT)

Fool me once, shame on you, fool me twice, shame on me.

BUT YOU KNOW?!?!? here it is, years later, no, sorry, decades later. IBM
keeps telling us what wonders they have imbedded in the RPG compiler. WOW!
Procedures, functions, bifs, oh my!

Free form. How wonderful! Isn't it amazing.

YET, for some damn reason, the compiler writers, still to this day, assume
that they know better than us when it comes to declaring a variable.

That's right, I got caught by this again. Try it yourself and see. Declare a
variable in DDS for a display file, make it zoned decimal 10,0. Make a
subprocedure that accepts, modifies and returns that field as a zoned
decimal 10,0 field. Code your prototypes, compile your subprocedures.
Everything looks good. Compile the DDS and the prototype in the user's
program. Show that DDS and call the subprocedure with the display file
field. BANG!

The moment this happened, I knew what it was, but that does not excuse the
compiler group. SO... now I have to put the field, that is already declared
in a file into a D spec and define it again as zoned decimal 10,0. And I
can't use like, because the compiler writers are too "smart" for that!

Since when (yeah, I know, it's historical) is it acceptable that a compiler
change the EXPLICIT INTENT of the programmer writing the code. Since when is
it a good idea to declare the same damn variable twice, in two different
sources, just to have the variable retain it's original declaration? Why do
we spend good money creating free format stuff to help increase obscurity
and leave little things like this that continue to bite programmers in the
ass?

If fixed column formating is "old" and "outdated" why then is changing the
explicit intent of the programmer so that RPG can store numbers in packed
decimal just so that the 38 processor can be more efficient, still an
acceptable practice today on PPC chips?

here comes the dismount....


===========================================================
R. Bruce Hoffman, Jr.
 -- IBM Certified Specialist - iSeries Administrator
 -- IBM Certified Specialist - RPG IV Developer

"Suppose you were an idiot...
  And suppose you were a member of Congress...
  But I repeat myself."
    - Mark Twain




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.