× 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: Naming /copy prototype members.
  • From: Paul Tuohy <tuohyp@xxxxxxxxxxxxx>
  • Date: Mon, 26 Mar 2001 20:00:15 +0100

Hi Rob,
Since you are talking about prototypes for external programs, I would recommend
that you:-

    - have one member per prototype
    - place the prototype member in a different source file (QPROTOSRC or
whatever)
    - give the member the same name as will be used on the CallP.

Just to explain the last bit.

Your prototype will need the EXTPGM keyword to identify an external call. So 
your
example should be

D XYZ123          PR                    EXTPGM('XYZ123')
D  PhoneNbr                     15A
D  Faxing#                      30A

But, since you are using this keyword, you can give the procedure a more
meaningful name

D PhoneNos        PR                    EXTPGM('XYZ123')
D  PhoneNbr                     15A
D  Faxing#                      30A

So the call would be CallP      PhoneNos(Phone:Fax)

HTH

Paul Tuohy

rob@dekko.com wrote:

> Ok, so I decide I want to create prototypes for external programs.  I want
> to use /copy.  I thought of having a separate member for each programs
> prototype.  If I do this what should the member name be?  Or is this
> something better handled by Conditional Compilation?
>
> For example, let's say we have the program XYZ123.  And this program had:
> C     *ENTRY        PLIST
> C                   PARM                    PHONE            15
> C                   PARM                    FAX#             30
>
> Now I change this to:
> D XYZ123          PR
> D  PhoneNbr                     15A
> D  Faxing#                      30A
>  * Replaces *ENTRY PLIST
> D XYZ123          PI
> D  Phone                        15A
> D  Fax#                         30A
>
> Now, to make this easier for other developers do I move
> D XYZ123          PR
> D  PhoneNbr                     15A
> D  Faxing#                      30A
> to another member, perhaps named XYZ123P, and end up with
> /copy mylib/qrpglesrc,xyz123p
>  * Replaces *ENTRY PLIST
> D XYZ123          PI
> D  Phone                        15A
> D  Fax#                         30A
>
> Or is it better to leave the PR in XYZ123 and use conditional compilation
> to just pull in the prototype?  If so, how?
>
> I try to put the comment * Replaces *ENTRY PLIST, in there for the people
> who scan for this.
>
> Rob Berendt
>
> ==================
> Remember the Cole!
>
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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:
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.