|
> Mark Lazarus: >It seems odd to me that "everyone" is >ga-ga over (set-at-a-time) SQL, >which is basically mini program >with its own cycle, yet can't wrap their >brains around the RPG cycle! Folks who were trained on relational database concepts from the start do not view SQL statements as mini programs. They do not conceive of SQL looping through records one at a time. They think of the statements as transactions happening on a set of data. ISAM trained RPG programmers would be the only ones to conceive of SQL execution as a cycle. They would translate the set-based operation into an iterative process that they were more familiar with. I've seen RPG programmers explain JOINs as SETLL/READE loops. >I don't understand how using >multiple platforms would influence your >decision whether to use the cycle or not. >If you are using RPG in the first place, >multi-platform compatibility is not your >first worry, since RPG is only truly >compatible to the IBM Midrange. I guess I wasn't clear with what I was saying about readability. I have never been trained in COBOL or C, but I can read these programs and figure out a lot of what they do. I've thrown RPG program fixes at non-RPG programmers and they've been able them out intuitively, to a point. Two of the principal unique characteristics of RPG are the cycle and indicators. If you READE, immediately move the indicator to a meaningful field name, and add a comment that says something like "invoice detail read successful", you can make the indicator function clear to any intuitive programmer. The cycle has its own mysteries. You have to know that the blocks of code are triggered to execute for every read or every break at a certain key, and that the READ loop is implicit (as well as the program's request for data). A programmer from another platform will never pick that up intuitively. It's a simple matter to write fully procedural program to visualize the READ loop and establish the level break logic through an explicit initialization routine and explicit comparisons of previous and current read data values. And a developer with strong programming experience and minimal RPG experience can read the code to figure out what the program does. The cycle contains processing and logic, so that processing and logic is concealed from view. It's not hard to put it back in view, and it enhances readability. If you're not working in an exclusive RPG shop readability is going to be much more important. -Jim James P. Damato Manager - Technical Administration Dollar General Corporation <mailto:jdamato@xxxxxxxxxxxxxxxxx>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.