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



Scott (following on your comments to Vern),

...and it may also not be near the beginning of the D-specs. My main
procedure PR/PI are always the last D-specs before the first C-specs (or
free-format equivalent).

Also, my main PR/PI is always set up as follows:

D ThisProgram C 'DQSVR'
...
... rest of D-specs
...
D main PR Extpgm(ThisProgram)
D p_Action Const Like(DQ_Action)
D p_qDtaq Const Likeds(DQ_qDtaq)
D p_DtaqKey Const Like(DQ_Key)
D p_qHandler Const Likeds(DQ_qHandler)
D p_Data Const Like(DQ_Data)
D p_RtnKey Like(DQ_Key) Options(*Nopass)

D main PI
D p_Action Const Like(DQ_Action)
D p_qDtaq Const Likeds(DQ_qDtaq)
D p_DtaqKey Const Like(DQ_Key)
D p_qHandler Const Likeds(DQ_qHandler)
D p_Data Const Like(DQ_Data)
D p_RtnKey Like(DQ_Key) Options(*Nopass)

So in my case, you'd need to find the first PI to determine what the actual
interface is, then hopefully look back up the source to find the matching PR
(if it's not in a copybook, of course) and *then* go back up looking for the
definition of the constant defined in the Extpgm keyword.

I'm not saying that my method is 'correct' (or even 'better' than anyone
elses!), but there is a reason why companies that write source analysis
tools can charge the big bucks - it's a lot more complicated than it might
at first appear...

Rory

On Tue, Aug 4, 2009 at 8:18 AM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>wrote:

Hi Vern,

First, a prototyped main is going to have PR in a certain position of D
specs. So you have a test for a prototype. Then the name will be the
same as the program - it will be 10 characters and somewhere near the
beginning of the D spec with PR in the right place.

The name doesn't have to be the same as the program. It also doesn't
have to be the same as the name of the module. You can make the name of
the prototype anything you want.

If you're trying to find the parameter list for a main procedure, you
just have to keep track of whether you've already seen a P-spec. If you
are outside of the P-specs (i.e. not between the Begin and End P-spec),
and you encounter a PI, it's the entry parameters for the main
procedure. Nothing to do with the name.

If you need to know info from the PR, then look for a PR that has the
same name as the PI.

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.