3X to i5 Flashback

An irreverent look at life with IBM's midrange computers for the last 25 years

March 18, 2007

Stupid RPG tricks and sourdough programming starter

Remember learning to program before the Internet? How did we do it? How did we learning anything? Back in the good ol' days, programming tricks and techniques were passed around from one programmer to another like sourdough starter was passed from gold prospector to gold prospector in the 1800s.

Early on for me, in the middle of a cornfield in Indiana learning RPG back in the late 70's and early 80's, I learned first not from magazines or COMMON, but rather from a few local programmers. I remember having lunch one day with a programmer friend of mine. We had hired the company he worked for to help us out and he was the guy assigned to our account. Long story short, he and his company weren't much help. But he did teach me a thing or two.

For a couple of years, before I learned that there were actually midrange programming educational resources avaiable, he and his crappy code were my main source of programming sourdough starter. I recall the thrill I got when I learned from reading his code how to set the value of sequential indicators with a single line of code. A single line of code! Remember this oldie-but-goodie:

'0010100' MOVEA *IN,55

Geeze, Louise. I thought the guy was a genius. I used the technique everywhere. Of course, the technique moved my already near-awful code a few squares closer to pure awful. But, hey, at least I was making it awful with very few lines of code!

The other nearly famous RPG trick I learned from reading my buddy's code was the infamous 10000.01 date multiplication trick. Of course, the trick wasn't commented and there weren't any meaningful field names used; it wasn't until about the 100th viewing that it dawned on me what was happening. With just one line of code, and no data structures or other nonsense, you could easily convert a MMDDYY numeric date into YYMMDD. Again, genius! It would be several years, and require another programming platform and language before the date data type light came on for me. But until it did, I thought 10000.01 was date manipulation nirvana.

How about you? What's your favorite stupid RPG trick? And who provided your programming sourdough starter?

rp

Posted by rpence at March 18, 2007 11:03 PM

Comments

I liked your posting about RPG tricks. I remember looking forward to next News/3X magazine to test new code techniques myself, it was like getting a present. When you are the only programmer in a shop you look forward any news of the trade.
I used that magic date converter, too. Your article definately reminded me of a few tricks I did to the users, using CL. One of my favorite tricks was to send a messages back to the user when they entered the wrong date in field. Some of my messages referred to their stupidity and I would loop back so they would enter the correct info, some of my messages just told them to follow the directions and I would cancel the job. Soon the users didn't make errors but when they did you could hear them gripe down the hall.
Remember when IBM installed a library of games on the System/34, FUNLIB? I allowed a few users access using a word that matched my secret phrase hidden in the CL, if the user didn't know the phrase I would send "Get back to work" messages to them and a message letting me know they were trying to goto the games. I loved the good old days.

Posted by: Janyce Musgrove at April 5, 2007 3:52 PM

I fondly recall the days of NEWS/34, Scope/34, and DataNetwork (the precursor to MC), and learning the useful as well as stupid RPG tricks.

What I don't have fond memories of is that spaghetti nature of RPG II code back then. In fact, a coworker and I were so frustrated in deciphering MAPICS RPG II code that we wrote and sold a little documentation utility called DGEN.

We never made money on it, but it sure was slick, IMO. One cool feature was that it would draw brackets connecting GOTOs and TAGs, and properly indent them so that you could quickly determine which were outer and inner loops.

I really don't miss the RPG II days at all. The fixed format, tiny variable names, indicators, lack of IF statements, SEU, SDA, lack of a debugger, and on and on, makes me glad I'm using PHP, VB, and a host of other languages.

Posted by: Street Talk Guy at April 9, 2007 12:23 PM

Post a comment




Remember Me?

(you may use HTML tags for style)

Acceptable Use Policy

Bill Blalock
January 2009
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Blog Policy

We welcome your comments and opinions and encourage lively debate on the issues. However, Penton Media reserves the right to delete or move any content that it may determine, in its sole discretion, violates or may violate its Terms of Use or is otherwise unacceptable. For more information, see Penton Media's Terms of Use.

ProVIP Sponsors