|
Well, Top Down Structured Programming (or modular) sure made sense in the 70's, when programs could produce a horrible tangle of code. It makes sense today, given the way RPG is evolving with /Free, etc. I teach it to my upcoming RPG programmers. Interesting, some of the prominent presentors at COMMON, etc. still hand out examples that say: Exsr Read_record Exsr Update_record Huh? -----Original Message----- From: rpg400-l-bounces+wesr=scc-inc.com@xxxxxxxxxxxx [mailto:rpg400-l-bounces+wesr=scc-inc.com@xxxxxxxxxxxx] On Behalf Of Alan Shore Sent: Tuesday, April 25, 2006 4:59 PM To: RPG programming on the AS400 / iSeries Subject: RE: Recommendations for Modular Coding HOWTO "Actually, modular (or structured) programming was how they taught us to write COBOL back in the 1970's. Interesting to see it resurfacing." That's the same for me. I learnt/was taught COBOL back in the 1970's, and then introduced to modular (or structured) programming once I (supposedly) understood COBOL. Another name given to modular programming was GOTO-less programming. The way modular programming was explained to me was to split the coding into little blocks (sections or paragraphs etc. in COBOL, subroutines etc in RPG). These little blocks of coding had one single purpose in life. For example, that purpose was to:- 1. Print the headings on a new page OR 2. Write a record to a file. (This may also include the increment of a counter, as well as the initialization of fields in that record, prior to returning back to the mainline code. OR 3. Calculating the check digit to an account number A good way of modularizing, was that each little block would correspond to a block in our flow-chart. (I haven't seen one of those in decades). There are no real hard and fast rules to this. Somebody is going to read what I have written and proclaim, "What a load of !@#$%^&. Modularization is such and such a thing", and from their perspective, they would be correct. A question you have to ask is, does this little block of code (Section, paragraph, subroutine etc.) do one thing? If need be, can this little block of code (Section, paragraph, subroutine etc.) be used in multiple different places and obtain the same end-result, with no change. Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx "Wilt, Charles" <CWilt@xxxxxxxxxx om> To Sent by: "RPG programming on the AS400 / rpg400-l-bounces@ iSeries" <rpg400-l@xxxxxxxxxxxx> midrange.com cc Subject 04/25/2006 03:00 RE: Recommendations for Modular PM Coding HOWTO Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> Wes, The "Who Knew..." Redbook is on my list. It's useful, but limited in the amount of examples it provides with respect to modular coding. Thanks, 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 Wes Reinhold > Sent: Tuesday, April 25, 2006 1:48 PM > To: RPG programming on the AS400 / iSeries > Subject: RE: Recommendations for Modular Coding HOWTO > > The RedBook, "Who knew you do that with RPG IV, etc. etc.", at least > the older version, has a good chapter on this. > Actually, modular (or structured) programming was how they taught us > to write COBOL back in the 1970's. Interesting to see it resurfacing. > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Wilt, Charles > Sent: Tuesday, April 25, 2006 1:18 PM > To: RPG programming on the AS400 / iSeries > Subject: Recommendations for Modular Coding HOWTO > > All, > > I'm trying to locate some reference materials to help my RPG III > programmers get a better picture of how to code in a more modular > fashion. > > Materials with RPG IV examples would be great, but it seems most RPG > IV reference material is geared toward syntax instead of application > design. > > Anybody have any favorites or know of training that focuses on the > usage of RPG IV instead of the syntax. > > Thanks, > > Charles Wilt > -- > iSeries Systems Administrator / Developer Mitsubishi Electric > Automotive America > ph: 513-573-4343 > fax: 513-398-1121 > > > -- > 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. > > > -- > 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. > > -- 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 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.