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



As far as I'm aware, you can't have a procedure w/in a procedure (I just tried), so an ending P-spec will always be associated with the beginning P-spec you have just encountered. No need to match up the names.


I think this is going past the original topic, but if you wanted to create diagram all of a module's procedures, you could do something like this:

1. Read through code.
2. PR encountered w/no P-spec encountered. Save the name.
3. Read for PI. Create your diagram based off of the PI and its parameters, using the procedure name from #2.
4. Continue reading, this time looking for a P spec. First P-spec encountered will be your Beginning P-spec. (You don't even need to look for the 'B' - especially since it may not be on the first line of the P-spec. Process the PI that comes afterward. Use the name from the P-spec (instead of the PI).
5. Read for the ending P-spec ('E').
6. Rinse & repeat starting at #4.

Not a well thought out flow, but it's what I got off the top of my head.

-Kurt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Rory Hewitt
Sent: Tuesday, August 04, 2009 10:54 AM
To: RPG programming on the IBM i / System i
Subject: Re: Global variable search

Kurt,

What if the ending P-spec doesn't have a name either?

Rory

On Tue, Aug 4, 2009 at 8:30 AM, Kurt Anderson
<kurt.anderson@xxxxxxxxxxxxxx>wrote:

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

Well, look for a P-spec with a B notation with the same name as the PR
(remember the potential for ellipses). The PI after the P-spec does not
have to have a name on it.

e.g.
P isInternational...
P B
D PI n

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Scott Klement
Sent: Tuesday, August 04, 2009 10:18 AM
To: RPG programming on the IBM i / System i
Subject: Re: Global variable search

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.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.