× 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: How can I tell what parameters are required by a program?
  • From: Henrik Krebs <hkrebs@xxxxxxxxx>
  • Date: Thu, 06 Jul 2000 06:40:36 "GMT"

>> Does anyone know of a technique to see what parameters are required
>> in a compiled program? I do not have the source. I want to find out
what
>> attributes (type and size) are required for each parm. I've looked
through
>> APIs but have not found one that could tell me this.

>>> Al, this would make for a interesting tool addition, although I'm
sure it
>>> would be easiest done in RPG...:)

Based om my freeware utility RTVPGMFLDA
(http://hkrebs.dk/rtvpgmflda.html) here is a method _almost_ to find
the field names and their attributes:

Retrieve # of parameters (real value in OPM-RPG, 255 in RPGLE).
Start debug, add a bkp at first MI (#0001) with a bkp-pgm doing a DUMP
and then an escape back. 
Then call the program with the retrieved number of (dummy) parameters
and get the dump listing all fields. The program will not do anything,
thus do no harm.
For each of the fields in the dump, do the following:
Start debug, add a bkp at first MI (#0001) with a bkp-pgm doing a
DSPPGMVAR and then an escape back.
Then call the program with zero parameters. This will result in
CPF1991 for each external parameter. The external parameter is either
an *ENTRY-parameter or a CALL-PLIST parameter or both. Which of theese
you have to guess (sorry).


Henrik
http://hkrebs.dk

---------------------------------------------------------
This mail was sent through Eoffice: http://www.eoffice.dk

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