IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New What, again?
OK - here's the IBM description of the cycle:
[link|http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QBKAQV00/2.1#HDRGENCYC|http://publib.boulde...V00/2.1#HDRGENCYC]

Level breaks are boolean indicators indicating that a file key value has changed (files are either in key or sorted order). when a record key (part of a hierarchy of keys, potentially) changes, 'total' calcs can be performed - then detail calcs run - and these can be conditioned on whether a level break has just occurred or not. In report generation, this can be used clear and/or roll totals, get strings for header, detail, or footer information, what have you - but report generation is only the tip of the iceberg, so to speak. It's equally useful for timing things when doing batch processing or interactive programming (displays are 'display files'). There is no explicit file read for the primary or secondary files; that happens outside of the 'calc specs'. File/display/printer writes can be done at any time (via excpt), or according to what point the cycle is in (conditioned in the output specs).

All these things can be accomplished 'by hand', of course, but with the cycle, you don't even have to think about them.

It was geared toward RPG's original purpose in life, as a report generator. And it's good for that, it really is! It's just that it's good for so much more....

Now, however, RPG 'programmers' ignore the cycle and just use explicit reads and writes - and add (generally clumsy) logic to do everything the cycle is there to do for them.

[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
New I'd have to use it to see the point
Certainly that brief description doesn't sound useful for anything that I've needed to do...

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New Unfortunately true for many.
Hey, when I started using RPG, I didn't see the point myself. It was when I worked for Design Systems that I 'saw the light'.

Working with the cycle is different. It's too bad (IMO) that it never caught on, and got put into other languages.
[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
New I dunno, Skip
IIRC SNOBOL2 had a similar construct. You got a string from the input data set, then ran various filter specs over it. the specs that ran over a given string could change based upon what previous filters found (or didn't find), and there were ways to save contexts and variables and such across the "cycles".

It's been about 35 years or so since I ran my last SNOBOL2 program, so I don't know how accurately I remember it, but...there you have it.
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New You're up on me
I've heard of Snobol, but I'm totally unfamiliar with it.

It's not as if you actually filter anything with the cycle - it just sets indicators (boolean values) depending on whether a value changes or not. It doesn't actually retain breaking (or broken) values unless you do it explicitly. There are conditioned sections of the program that are run/used according to what point in the cycle you are in. Multiple levels of level breaks make the thing damned useful.

I guess it's just that the cycle makes programming in RPG easy. I'd probably totally hate the language if I had to write RPG code without it.

Without the cycle, RPG is just... Lame.
[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
New SNOBOL *Two*?
That could be interesting to see. Lessee what my Google-fu is like...

I've worked with SNOBOL4 a bit and like what it can do. But it's a FORTRAN-like language with no structures between gotos and functions. :-/

Wade.

Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please

-- "Anything but Ordinary" by Avril Lavigne.

New SNOBOL2 most definitely != SNOBOL4
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New Can you give a concrete example?
Something where working with the cycle unexpectedly makes your life obviously easier?

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New I was thinking of that.
I'll try and post some example code. Probably after this weekend, though. I'm headed back to 'Jersey for some fun with my Edison buddies...
[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
New Think of perl autolooping
over a set of data. And autosplitting.
And auto-outputting.

And then setup a couple of functions to be executed when key variables change, and the variables are setup in a hierarchy so you can automatically generate sub-totals.

Think of Oracle's SQLPLUS "break on" and "compute" syntax on steroids.
New I'm thinking about that and...
am thinking, "Think of everything that you don't tend to use in Perl because my problems don't break down that way."

I'm sure there is a problem space where it is great. But I don't work in that space.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New I don't know Perl
But if the features Barry named were descriptive, he's probably described the cycle better than I could have (combined wth the IBM link/flowchart).

For the bulk of my work on the '400, the cycle has been a major blessing. RPG itself has some big drawbacks, though. 99% of what you are manipulating are DB (or screen) files. Consider it in that context...

Indicator conditioning can make a program unreadable, for example. Especially when multiple indicators are used on a single line of code. String handling is a total PITA.
[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
Expand Edited by imric April 24, 2005, 09:04:18 PM EDT
New Don't even bother
You really can't describe indicator processing without
showing someone the form you fill out.

I haven't seen indicators in about 20 years, and
I'm still traumatized.

When I was learning COBOL in the 6 month tech school, I
taught myself RPG II at the same time. Every problem they
gave me in COBOL, I did in RPG as well. 1/10th the code.

But it really wasn't code. Was more of a fill in the table.
New Whoa, that takes me back.
I haven't seen that form in many years.. More important was the template.

Some tasks (like, say, generating reports) are trivial to do in RPG - but, while everything is/was postional, writing RPG code is hardly just filling out a form... As for Cobol, BLEAH. Comparing verbosity? Heehee.
[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
New But, COBOL programs can be read by management! :)
Or so they promissed.
Alex

The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt. -- Bertrand Russell
New Cobol DOES give that illusion...
[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
New Oh, sure they can, that's no illusion.
Just remember that "reading" is not the same as "comprehending". (For one thing, they're spelled way differently.)


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New heheh.
[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
New Yeah, the same way I can read Hebrew :)
I can sound the words, if they are simple.

------

179. I will not outsource core functions.
--
[link|http://omega.med.yale.edu/~pcy5/misc/overlord2.htm|.]

New *chuckle*
[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
New Ignoring the cycle
[link|http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/books/c0924514680.htm|http://publib.boulde...s/c0924514680.htm]

Gee, I wonder why they ignore it?
New Because
People aren't trained in it anymore. It's not intuitive for VB or C programmers; programmers brought up with other languages would rather just try and use RPG as a substandard clone of what they already know rather than take the time and effort to actually use the language to it's full capacity.

It's a damned shame, and I've been watching the disuse and deprecation of the cycle for a long time.
[link|http://www.runningworks.com|
]
Imric's Tips for Living
  • Paranoia Is a Survival Trait
  • Pessimists are never disappointed - but sometimes, if they are very lucky, they can be pleasantly surprised...
  • Even though everyone is out to get you, it doesn't matter unless you let them win.


Nothing is as simple as it seems in the beginning,
As hopeless as it seems in the middle,
Or as finished as it seems in the end.
 
 
     OK, explain the cycle to the ignorant masses here -NT - (tuberculosis) - (22)
         What, again? - (imric) - (21)
             I'd have to use it to see the point - (ben_tilly) - (18)
                 Unfortunately true for many. - (imric) - (17)
                     I dunno, Skip - (jb4) - (3)
                         You're up on me - (imric)
                         SNOBOL *Two*? - (static) - (1)
                             SNOBOL2 most definitely != SNOBOL4 -NT - (jb4)
                     Can you give a concrete example? - (ben_tilly) - (12)
                         I was thinking of that. - (imric)
                         Think of perl autolooping - (broomberg) - (10)
                             I'm thinking about that and... - (ben_tilly) - (9)
                                 I don't know Perl - (imric) - (8)
                                     Don't even bother - (broomberg) - (7)
                                         Whoa, that takes me back. - (imric) - (6)
                                             But, COBOL programs can be read by management! :) - (a6l6e6x) - (5)
                                                 Cobol DOES give that illusion... -NT - (imric) - (2)
                                                     Oh, sure they can, that's no illusion. - (CRConrad) - (1)
                                                         heheh. -NT - (imric)
                                                 Yeah, the same way I can read Hebrew :) - (Arkadiy) - (1)
                                                     *chuckle* -NT - (imric)
             Ignoring the cycle - (FuManChu) - (1)
                 Because - (imric)

They're trying to teach you math by brainwashing you.
218 ms