- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I'm assuming RPG neither stands for Role Playing Game nor for Rocket Propelled Grenade?
Edit Admin
It's Report Program Generator. See https://en.wikipedia.org/wiki/IBM_RPG
It was one of the very early attempts at "easy" report generation. Essentially the app contained an engine that knew how to do multi level reports and you just had to describe tur data layout, report layout, totalling requirements, etc. But this was all in the era of punch cards and sequential files (card, tape, or newfangled disk) as "databases".
To say the old syntax was idiosyncratic is a huge understatement.
Addendum 2025-12-08 07:21: Every geezer in the audience has memories of it. You either did a bit of it, or knew people who had & still bore the scars.
Addendum 2025-12-08 07:22: It really was a bit of a mindf**k.
Admin
I had to look it up, so the following link in the article would have been useful: https://en.wikipedia.org/wiki/IBM_RPG
Edit Admin
My first thought was, "What do roleplaying games have to do with this weird ancient-looking syntax?"
Edit Admin
Indeed, as noted, although "rocket-propelled grenade" (with the hyphen) is an English-language backronym (less contrived than most, by convenient coincidence) from the romanisation of a Russian-language term, or so quoth the Unreliable Source:
Edit Admin
I worked at a Fortune 50 company until 2013, they were still writing new RPG code when I left. They converted to RPG Free some time while I was there, probably around 2010.
One of my favorite "features" was that columns were treated as local variables, so if you needed to access the columns from two tables, all the column names had to be globally unique. This combined with an eight character column name limit (I don't know the reason or if that was a local WTF), led them to have every table use a two character prefix for all of its columns, leaving six characters for the actual column name.
Admin
We still write new RPG code and programs every day. Our entire company runs on it. And because a lot of the code dates from the late eighties and nineties it is a mix of RPG III, IV , free and full free. New code is still written in all these formats, depending on who is coding and what style is used in the program you modify. And column names are suffixed with a two character code to make the names unique across the database
Admin
Back when I was a teenager, I was trying to teach myself game development in C++. I was a big fan of the Final Fantasy series, and so I wanted to make a Role-Playing Game.
I was googling around (or perhaps I was Yahoo!'ing around?) for websites on "RPG programming", and I was very confused when I found all these books about the RPG programming language. Fortunately, I managed to avoid accidentally buying any of those books.
Admin
This seems like a bad name for Wikipedia since the stochastic goldfish that are ChatGPT and its peers have become the go-to unreliable sources for millions of people worldwide
Edit Admin
I was introduced to RPG in the 1980s. I learned a little bit, but all the "programming" I ever did in RPG was mostly cosmetic, making columns wider when the numbers got bigger or adding a column that was the sum or the difference of two or three columns.
I always regarded RPG as a poor man's COBOL in the way that MINIX's employs a poor man's fstab.
Edit Admin
You're not wrong about LLM generative "AI" doodads, but Wikipedia remains the original informatic fount of large-scale(1) unreliability, and I've called it "the Unreliable Source" almost since the beginning, long before ChatGPT and its foul kin got started.
(1) Yes, I know, almost anything to do with informatics might be considered a fount of unreliability, but Wikipedia has that extra thing of being "the encyclopedia that anyone can edit", with the additional proviso that I add, "and frequently does".
Edit Admin
Wow thanks, never heard about that one before :-O
Admin
I'm a geezer who should know better (professional programmer since '78) but I have the heart of a 13 year old boy.* For me, RPG = Role Playing Game.
Crazy aside: Did anyone but me notice that the source-code in "The Martian" was Lisp?
Edit Admin
Sometimes I feel really lucky that I dodged a bullet there. I managed to never got stuck on ol' IBM classic host "stuff" and could always play with the newer toys :-).
Edit Admin
To be fair, it IS easy compared to the brain-twisting mess of programming accounting machines. See Bitsavers for a taste!
https://bitsavers.org/pdf/ibm/punchedCard/AccountingMachine/224-1614-13_402-403-419.pdf
Page 6 has a picture of a control panel. To make a report, you place physical wires from one socket to the next. And yes, version control was a mess.
Edit Admin
I worked for a trucking company in 1985 that had a computer that ran RPG II. I looked at books on how to program it, but ran out of weed and gave up.
"This combined with an eight character column name limit (I don't know the reason..." Everything (IDs, passwords, filenames) had an eight character limit. I don't know the reason, but Octal may be related.
Admin
I'm the OP. I forgot I'd even sent this in; it's been a year or more since I last worked on that program.
We use The IBM Midrange Formerly Known as AS/400. IBM does keep adding features to ILE RPG, believe it or not. (ILE = Integrated Language Environment)
The code was written in 2004.
Stephen's idea of converting RPG IV fixed-format to free-format, when I insisted on it, was to manually remove the C (for "calculation") from the beginning of the line and stick a semicolon on the end of the line, without changing the spacing or indentation.
Edit Admin
If you mean the movie, it's actually PVS (Prototype Verification System), which is indeed implemented in Common Lisp.
Knowing Hollywood rules of drama, they probably picked it because it looks weird, as that would not make any sense to run that in the Hab.
Edit Admin
So I guess you might need RPG (the software) to keep track of the RPGs (weapons) in your RPG (video game).
Admin
OMG. RPG was my first "programming" language, took courses through the local community college while in high school back in the late 70's (took Cobol and Fortran as well). Ah the good old days with keypunch machines and batch processing...
Admin
The reason for the 8 character name limit was 80 column punch cards. The first 5 columns were for sequence numbers. In case you dropped a box of cards, and you meticulously kept the sequence numbers up to date, you could just drop them in the card sorter and were none the worse for it. The next column was for the card spec. H-program header, F-file, I-input, C-calculation, O-output. There were others, but the C spec was the limiter. The next 11 columns were for option indicators. These indicated whether to execute the line or not, these blocks got quite ugly in RPG II.then 10 for Factor 1, 5 for the op code, and 10 more for factor 2, then 6 for the result column. Yes, that is 6, and in RPG II, if a variable name ever had to appear in the result column, it had to be 6 characters or less. The next 5 columns allowed you to give the result field a definition if it wasn't already defined in the program. 3 columns for length, 1 for type, and 1 for decimal places. Following this were 6 columns for resulting indicators. That left 21 characters on the far right end for a comment. If this all seems a little Assembly language like, it was. No algebraic or logic expressions. Just opcodes like add, move, if, and, or. To process data in a file, it was read, write, chain, and a few others. All in all it was a very simple language to learn. Except for the cycle, matching records, and level break processing. Those things could make you pull your hair out. But very powerful. RPG 4 **free format, changed the language a lot. Got rid of the field limitations,made it easy to call procedures written in another language, C even, and made reading RPG much like reading a language like Pascal.
BTW, RPG was not last updated in 2020. It receives updates twice a year, including new built in functions and opcodes. It can call procedures out of IBM's version of .dll, called service programs on IBM I. And these shared procedures can be written in any ILE language. Currently, these are RPG, C, CL, and Cobol.
Edit Admin
Ideally, you would use an RPG (rocket-propelled grenade) to destroy RPG (the language) and RPG (the games).
No, I don't know why I am feeling violent this morning hahaha
Admin
RPG would definitely be one of the more destructive footguns
Edit Admin
Hey now, what do you have against the game style?
Thanks to all the folks for the interesting tidbits of computing history. As an aside: The original developer's name immediately reminded me of this old post from the days when I still hadn't retired from the internet: https://imgur.com/phteven-is-that-you-phteven-w94k4VY