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



I repeat - right-click in the RPGLE editor and move over the New-> item and then pick Procedure... - it's a fantastic wizard - gives you consistency in prototype and a skeleton for your procedure. Something like this is what you get - I ran it through another right-click for converting to free form to get the // comment header - even the return variable is created

D*--------------------------------------------------
D* Procedure name: ProcedureName
D* Purpose: Purpose of this procedure
D* Returns: Return indicator for success or failure
D* Parameter: parameter1 => This is parameter number 1
D*--------------------------------------------------
D ProcedureName PR N EXTPROC(EXTERNALPROCEDURENAME)
D parameter1 32A CONST
P*--------------------------------------------------
P* Procedure name: ProcedureName
P* Purpose: Purpose of this procedure
P* Returns: Return indicator for success or failure
P* Parameter: parameter1 => This is parameter number 1
P*--------------------------------------------------
P ProcedureName B D ProcedureName PI N D parameter1 32A CONST

D* Local fields
D retField S N
/FREE

// Your calculation code goes here

RETURN retField;

/END-FREE
P ProcedureName E
Try it - you might like it!

Vern

RNewton@xxxxxxxxxxxx wrote:
If there were broader use of WDSc and snippets, then I think a lot of the
arguments of how much time verbose source adds to development would fall to
the wayside. If you're using a template or snippet then you're saving so
much time that you can let the structure be as elaborate as you want. It
takes the same amount of time to invoke the snippet regardless of it's
content.

Robert Newton
EDPS
Electronic Data Processing Services
System Owner
804-353-1900 x2256
rnewton@xxxxxxxxxxxx


From: Joe Pluta <joepluta@xxxxxxxxxxxxxxxxx> To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx> Date: 05/29/2009 01:50 PM Subject: Re: Sub procedure end specification Sent by: rpg400-l-bounces@xxxxxxxxxxxx




RNewton@xxxxxxxxxxxx wrote:
By using the line extender "..." it
allows us to easily use this as a template so we can do find and replace
for the proc name without adjusting the position of everything after it.

This is the best use of the extender I've seen to date.

A big +1 to this technique. If you're going to go verbose, this is
definitely the way to go.

Joe

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.