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


  • Subject: RE: Numeric parameters between RPG progr
  • From: Jon Paris <paris@xxxxxxxxxx>
  • Date: Mon, 1 Jun 1998 09:55:50 -0400

>> That's very true. Parameters are always passed by reference in RPG. This
particular "feature" makes it impossible to define a parameter based on the
database data definition. That defeats any attempt to achieve data
independence. Converting from alpha is no better. You still have hard coded
definitions that may or may not be OK if the database changes. Really
irritating... To borrow a phrase from Tim Allen, c'mon IBM let's walk the walk.

Oohhhhhh - I can't let that one pass for a number of reasons.

 1) It's got _nothing_  to do with RPG.  On the AS/400 _all_ program to program
parameters are passed by reference no matter what the language.  This is a
carry over from the S/38.

 2) The fact that the parameter is passed by reference makes it easier, if
anything to achieve data independence.  What could be better than only passing
the starting address of the parameter?  That way it can be any length any
type.

 3) You can also code explicitly for data type independence by passing a
pointer containing the field's address to the target program.  You've been able
to do this in RPG since pointers were introduced in V3R1.  I think COBOL
allowed this in V2R3 and C has always allowed it.

 4) Please point out to Tim Allen that RPG IV has been "walking the walk" since
V3R2/V3R6.  COBOL and C also allow this - in fact only CL lacks this ability.
Pass by value was introduced to the AS/400 for the first time with the
introduction of ILE in V2R3.

I don't mean to jump all over you, I'm the first to accept (if not join in!)
the criticism when it's justified, but unless I'm missing something, this just
seems to me to be way off base.

Jon Paris - AS/400 AD Market Support - paris@ca.ibm.com
Phone: (416) 448-4019   -   Fax: (416) 448-4414
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.