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* 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 parameter1 32A CONST
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 ProcedureName B D ProcedureName PI N D parameter1 32A CONST

D* Local fields
D retField S N

// Your calculation code goes here

RETURN retField;

P ProcedureName E
Try it - you might like it!


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

Robert Newton
Electronic Data Processing Services
System Owner
804-353-1900 x2256

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.


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].