|
Can't say I lived through those times :-) That is the bitter sweet thing I am finding out about programming more and more. It is great when something has been around forever unchanged because then there is some consistency across the IT board as far as standards, best practices, methodologies, technologies, etc. But then if they haven't changed in a long while then that probably means things that could be fixed haven't been. That's what gets me about Java. Such a rich tool, but such a PITB to keep tabs on the latest and greatest. RPG doesn't really have that problem, IMO, and that many times is a good thing because the learning curve is finite. Anyways... I am done rambling now :-) Thanks for your response Wes. Aaron Bartell http://mowyourlawn.com/blog -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Wes Reinhold Sent: Wednesday, April 26, 2006 9:23 AM To: RPG programming on the AS400 / iSeries Subject: RE: Recommendations for Modular Coding HOWTO As in the days when we wrote programs on codeing sheets and included page and line numbers (and then turned them into the key punch department) - You put gaps in the numbers. BEGSR A000; // START BEGSR A100; BEGSR A200; Actually A100 would be called from of A000 and A200 would be a subdivison of A100 etc. As you say, WDSC may address this as well and better. This is one area I have yet to embrace. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of albartell Sent: Wednesday, April 26, 2006 9:50 AM To: 'RPG programming on the AS400 / iSeries' Subject: RE: Recommendations for Modular Coding HOWTO I think the example you mention was put in place by shops because of the lack of a good IDE. With WDSC and the Outline view it is very easy to get to the sub whatever you want to go to without having to name them according to when they appear in the program. What happens when you need to add a new sub routine and it SHOULD be placed in-between A000.. And B000..? Do you put it at A001...? And what happens when you need one in-between A000... And A001? Am I missing something? Aaron Bartell http://mowyourlawn.com/blog -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Wes Reinhold Sent: Wednesday, April 26, 2006 8:05 AM To: RPG programming on the AS400 / iSeries Subject: RE: Recommendations for Modular Coding HOWTO If they had been using Top Down Structured methods, it would have read: Exsr A000_read record Exsr B000_Update_record (or whatever) This allows you to find the Sub whatevers easily. Very simply TDSP follows these (and other) guidelines: Work from the very to the very detailed. Every Exsr does something below you, never above. No gotos of course. Every Subroutine starts with a sequential letter A000 B000 Etc. Please note that I am not advocatating Subroutines over Sub whatevers, You can embed SQL calls, calls to other programs, etc. In a subroutine. As anyone who has written programs for a while knows that good programming is 99 % organization. This was taught to COBOL programmers back in the 70's as a method to counter the horrible tangled code That programmers at that time were turning out. Having come in from the cold and started working on an a AS400 again in 1999 I noticed that ILE RPG lent itelf well to these methods and I started using them again on ILE RPG. As I noted, the RedBook "Who Knew You Could Do That with RPG ............." Has a simple consise style sheet section. This is downloadable although that version doesn't seem to as complete as an older version I ordered through the mail. Other sources, as have been noted, are also available. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of albartell Sent: Tuesday, April 25, 2006 5:20 PM To: 'RPG programming on the AS400 / iSeries' Subject: RE: Recommendations for Modular Coding HOWTO <Wes> Interesting, some of the prominent presentors at COMMON, etc. still hand out examples that say: Exsr Read_record Exsr Update_record Huh? </Wes> What's wrong with that? Or rather, what is your definition of modular programming? Aaron Bartell -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Wes Reinhold Sent: Tuesday, April 25, 2006 4:08 PM To: RPG programming on the AS400 / iSeries Subject: RE: Recommendations for Modular Coding HOWTO 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. -- 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. -- 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.