|
Booth Martin wrote: > > Here's the obvious questions for you: > > Now that you've used the cycle are you prepared to embrace its power and > simplicity? Was it a good experience for you? Have you used Level breaks > and Matching records yet? How many loops and lines of code do you guess it > eliminated for you? Dear Mr. Martin (et al.): So far, I've had no reason to use anything beyond the most basic form of "The Cycle." The two programs I've written where it's controlled by a primary file are interactive file repair tools that "ride The Cycle" to quickly scan through files, looking for the problems the programs are designed to diagnose and (in most cases) repair. The less complex of the two took a bit under a week to go from basic idea to finished tool, display file and all, while the more complex one took a bit over a week. My other "Cycle" programs are interactive ones that simply use "The Cycle" as the terminal-based equivalent of the "event wait loop" found in typical event-driven GUI and server programs. I suspect that if I were using RPG to actually "generate report programs," I'd probably be using the more esoteric corrollaries of The Cycle with some regularity, but so far, I've yet to write a single "report program" on a system that had RPG available, or to find a single other situation where those corrollaries would help me. And something I was groping for in my earlier diatribe: The Cycle (and its corrollaries) are as inherent to RPG as things like the increment, decrement, and question-colon operators are to C and Java. Asking somebody to ignore The Cycle in RPG, just because it's unique to the language is like asking them to ignore "++" or "-=" in C, or to ignore the exponentiation operators in BASIC, FORTRAN, and PL/I, or to ignore some of the higher-level MI instructions because "real" assemblers don't have them. Something else my "test question idea" brings up: the fact that under OS/400, it's very easy to write a "terminate-and-stay-resident" program that will remember data from one call to the next, within a job. Very useful concept, and (with return statements vs. SETON LR) exceptionally easy to do from RPG. -- James H. H. Lampert Professional Dilettante http://www.hb.quik.com/jamesl http://members.hostedscripts.com/antispam.html http://www.thehungersite.com Help America's Passenger Trains. http://www.saveamtrak.org Read My Lips: No More Atrocities!
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.