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



Michael,

First off, you don't need the EXTPROC keyword.  When it is left off, it is 
assumed and the name used is the procedure name.

Secondly, I prefer to keep prototypes in QPROTOSRC, that would allow you to get 
rid of the '_PR' in the member name of the prototype.


Are you planning on having this procedure in a service program or just in a 
module?

Not sure what you are asking as far as multiple sub procedures in a single 
source member.  I can't imagine having individual source members for each 
procedure.  Normally, you'd see all related procedures in a one source member 
whose name matches the service program.

In your case, I'd expect to see a GetGroup() function in either a service 
program related to the file the "Group" field is in or a "GROUPFUNCS" type 
service program.



HTH,

Charles Wilt
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
 

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Ala, Michael A
> Sent: Tuesday, February 01, 2005 1:28 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: Prototyped Procedures
> 
> 
> What is the best way to perform Procedure prototyping 
> I would like some rules 
> I am not sure if I am performing any steps that are unecessary
> This is in the caller
> D/COPY MYLIB/QCPYSRC,GETGRP_PR  
> 
> This is what is copied in
> D GetGroup        PR             1A   EXTPROC('GETGROUP')    
> D  $Group                       10A                          
> D  $Cust#                        8S 0 CONST OPTIONS(*OMIT)   
> D  $Item#                       25A   OPTIONS(*NOPASS)    
> 
> 
> Here is the call for the Procedure (um Function)
> EVAL      $CustGrp=GETGROUP($Group:CUST#) 
> 
> Here is what is in the called Procedure
> D/COPY MYLIB/QCPYSRC,GETGRP_PR                             
> PGETGROUP         B                   EXPORT               
> D GetGroup        PI             1A                        
> D  $Group                       10A                        
> D  $Cust#                        8S 0 CONST OPTIONS(*OMIT) 
> D  $Item#                       25A   OPTIONS(*NOPASS)     
> D  $Found         S              1A   INZ('N')             
> 
> 
> Also what are the advantages to setting up multiple 
> sub-procedures in a
> single source member
> What limitations does this have 
> 
> 
> 
> I am always doing things I can't do; that's how I get to do them.
> 
>  -Pablo Picasso
> 
> 
> -- 
> This is the RPG programming on the AS400 / iSeries (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 ...


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.