× 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: Parm identification routine...
  • From: "Walden H. Leverich" <WaldenL@xxxxxxxxxxxxxxx>
  • Date: Fri, 7 Jul 2000 10:37:47 -0400

Don,

I'm not sure this information would be available. Where you can get parm
count from a program is shows in the DSPPGM screen. Beyond that all you are
really passing is pointers so I'm not sure you can get the info. 

If I write an RPG program and declare 5 parameters but I only pass 3 the
program will work fine as long as I don't access those last 2 parms. Also,
if I write a program that takes a char(5) and pass it a char(9) it will work
fine too. It will even work if I pass the program a char(4) -- granted, it
will munge one byte of memory somewhere. I can even pass a character field
into this numeric parameter.

My point is that the checking doesn't occur until the system actually tries
to use the memory passed to it. This could be hundreds to thousands of lines
into the program, and it may even be in another program -- program 'A' takes
a dec(5,0) and passes it to program 'B', program 'B' will blow up if you
pass character data, not program 'A'.

Therefore I submit that this information is not available via "object
interrogation"

-Walden

-----Original Message-----
From: Don [mailto:dr2@cssas400.com]
Sent: Tuesday, July 04, 2000 11:29 PM
To: mi400@midrange.com
Subject: Parm identification routine...



Greetings,

You've seen it before, you'll see it again...someone loses control of the
number, variable type, positioning, etc., of a parm list and is major
league SOL, up the creek, and in deep kemchi...

Now, my gutt tells me that this info is available by object interigation
and that it doesn't matter (other than perhaps differing methods) as to
observability....as runtime would have this info, regardless...

Has anyone written such a utility yet?

Don 

+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---
+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.