× 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 don't feel so alone anymore.

Duane Christen

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Buck
Sent: Wednesday, April 19, 2006 1:23 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Tool to convert Subroutine to SubProcedure


> Does anyone have a utility or tool 
 > that will convert subroutines to
 > subprocedures?

Don't do it.

You will be left with System/3 code that's gone through a conversion 
utility to make RPG/400 code that's gone through a conversion utility to 
make pseudo-procedures which have NO (as in not one) benefit whatsoever 
over the original crufty subroutines.

Write NEW code as subprocedures.  Use new techniques, new ideas and new 
philosophies.  Don't convert the old stuff to pretend it's modern.  It 
won't be.  When I say new code, I mean modifications, too.

Basically, if a subroutine does a dozen things and you're about to add 
the thirteenth, make that new 'function' into a subprocedure and insert 
the procedure call into your subroutine.  What's old and working remains 
working.  The new function is easier to debug and maybe you can reuse it 
elsewhere.  Maybe not, but no matter.

Once you get started writing your own subprocedures, your mindset will 
change and make that process more efficient.  Eventually you'll be 
thinking about how to reuse them and then how to build them so they're 
reusable.  It's all part of a learning curve that most RPG folk need to 
go through, so these early procedures are NOT wasted effort.  It's far, 
FAR better to write your own than it is to copy from the output of some 
conversion tool.

Yeah, I feel pretty strongly about that topic.
   --buck

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.