|
|
Did you ever see or code in RPG? THIS is an abomination!
It's got to be the most primitive language still in use today.
* Historically RPG was columnar in nature, though free-formatting
* was allowed under particular circumstances.
* The purpose of various lines code are determined by a
* letter code in column 6.
* An asterisk (*) in column 7 denotes a comment line
* "F" (file) specs define files and other i/o devices
F ARMstF1 IF E K Disk Rename(ARMST:RARMST)
* "D" (data) specs are used to define variables
D pCusNo S 6p
D pName S 30a
D pAddr1 S 30a
D pAddr2 S 30a
D pCity S 25a
D pState S 2a
D pZip S 10a
* "C" (calculation) specs are used for executable statements
* Parameters are defined using plist and parm opcodes
C *entry plist
C parm pCusNo
C parm pName
C parm pAddr1
C parm pAddr2
C parm pCity
C parm pState
C parm pZip
* The "chain" command is used for random access of a keyed file
C pCusNo chain ARMstF1
* If a record is found, move fields from the file into parameters
C if %found
C eval pName = ARNm01
C eval pAddr1 = ARAd01
C eval pAddr2 = ARAd02
C eval pCity = ARCy01
C eval pState = ARSt01
C eval pZip = ARZp15
C endif
* RPG makes use of switches. One switch "LR" originally stood for "last record"
* LR flags the program and its dataspace as removable from memory
C eval *InLR = *On
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Richard Andrew x64 wrote: Did you ever see or code in RPG? THIS is an abomination!
It's got to be the most primitive language still in use today.
I haven't, and it certainly looks like one.
I've never done any Real (tm) programming in mainframe era languages; COBOL and FORTRAN were singled out just because they're the two most well known and among the absolute earliest compiled langauges.
The closest I've came was porting an ~100-200 line FORTRAN program to C++ as less hassle than going to the school computer lab and running with a FORTRAN plugin for Visual Studio 98. Then at the end of the semester for the same astrophysics class I modified an ~2k line one to replace the 6ish input values that were fixed between each run of the program to hard coded values so I only needed to enter the two parameters of the model I was required to fiddle with in order to get the model to come out with a valid result. (After needing several hundred runs to pin them down, I found myself wishing I'd instead figured out how to automate them farther.)
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
I'd never seen it, but I'd heard of it. Makes COBOL look like a joy.
|
|
|
|
|
Agreed!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
You should learn where RPG evolved from.
Prior to digital computers, there used to be accounting/tabulating machines used by companies for their payroll calculations.
These calculations were very simple: in a factory employing thousands of workers producing all sorts of equipment -- from parts going into machines to complete assembled machines such as automobiles, radios, TVs, etc. -- workers were paid a base salary plus an incentive for every part/unit produced over the base limit set by the company. For instance, a worker may be required to produce 60 carburetors an hour (2400 based on an 8-hours a day, 5-day work week) and be paid a few pennies for each carburetor they produced over this limit.
A punched card for each worker would contain his base pay (this may vary from worker to worker based on seniority) -- remember that these electromechanical relay-based machines had no storage -- and the total number of units he produced in the week.
The accounting machine would read the punched card, subtract the base work unit of 2400 and multiply the remainder by the per-unit incentive pay, and add the amount to his base pay. A new punched card would be produced for the worker with his name and base pay (this would be used the next week so that the keypunch operator only needs to punch in the number of units produced) and a line would be printed in the payroll register showing the employee' pay for this week. The accounting machine would then read the next card and repeat the process.
These accounting machines very slowly disappeared as more companies adopted expensive digital computers. In fact, the first commercial computer was purchased by GE from Univac Computer Corporation for automating the payroll process.
However, you didn't have enough programmers to be able to program the new-fangled computers in assembler language. IBM, the primary supplier of accounting machines, felt that they could employ the programmers of the old accounting machines if they designed a language that mimicked the process used in the accounting machines. After all, you had to only:
Read a card
Perform a very simple calculation, and
Go back,
perhaps giving the name RPG.
Of course IBM had to call it Report Program Generator!
This language was provided in the early IBM 1401 computers and in the Series 3, 32, 34, 38 and the successor AS/400 systems. These machines were far cheaper than the IBM 360/370/390 series and were bought up by all sorts of small businesses. You had backward compatibility all the way back to accounting/tabulating machines!
But unfortunately, not forward compatibility with C which was not invented for another two decades and was not anticipated by IBM. So all of you code kiddies can complain about RPG.
The exact formatting requirements of RPG followed the pattern of the plugboard -- a rectangular board with holes arranged in several rows -- where a column of a hole indicated a function such as operation, first operand, second operand, resultant, etc.
Billions of lines of code were written in RPG and continue to function excellently even unto today, to the dismay of you all who are shocked that there used to be a time when programs did not have strange memory leaks which caused random failures and thus assure you of continuing employment.
The IBM AS/400 holds the record for the largest selling minicomputers (in the millions) a number exceeded only by the PCs which are of course obsoleted every 6 months by the latest and greatest Intel or AMD chip.
The AS/400 does support -- besides RPG -- COBOL, C, C++, and who knows what else.
However, there are very few people who are qualified in RPG that the RPG programs are allowed to remain undisturbed.
Entire ERP suites were written in RPG and are still in use today.
No, they are not as expensive as Oracle or SAP nor do they require periodic human sacrifices to keep them running.
|
|
|
|
|
Vivi Chellappa wrote: But unfortunately, not forward compatibility with C which was not invented for another two decades and was not anticipated by IBM. So all of you code kiddies can complain about RPG.
1959 - IBM Creates the RPG language in order to keep maintainers of electo-mechanical accounting machines employed. Code Project Insiders immediately condemn it for being insufficiently C-like. This occurs despite the fact that C has yet to be invented.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Kent Sharkey wrote: An incomplete list
Not just incomplete, but inconsistent. The author heavy snarked at:
#7 Ruby
#9 Java
#10 R
#16 Javascript
#23 Python
While these were given a single shared paragraph at the end
#1 VBA
#2 Ojective C
#3 Perl
#4 ASM
#5 C
#8 C++
And conspicious by it's absence was
#6 PHP
Which I guess tells us what this person's language of choice is.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Short answer: because we said so. It's a feature
|
|
|
|
|
I always thought mistakes were some of the best teachers out there.
The important part is... how big are the letters when you then say "OOPS!!" ?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
The most damning bit of the entire cluster elephant, is that even gating new warnings for dangerous code behind eg -W2020 , -W2021 , etc flags - so the knuckleheads who value 0 warnings above doing work or having safer and less buggy code could be happy, while people trying to maintain secure codebases or starting new projects from scratch could have more detailed warnings of known potential problems to address/avoid - is a bridge too far.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Microsoft has been slowly moving functionality from the Control Panel applets to the Modern Settings in Windows 10, but long-time Windows users may be annoyed by the latest change in Windows 10 version 2004 Did it ever work?
At least for non-Microsoft drivers
|
|
|
|
|
Quote: Oh, think twice, 'cause it's another day for you and me in paradise
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
It’s been approximately 12 million years since most of us last used a floppy disk, but apparently, the antiquated tech still plays a critical role in delivering software updates to Boeing’s 747-400 planes. I wonder if they cut a second notch so they can use it double-sided?
Yeah, you couldn't do that with 3-1/2's, but I couldn't think of a joke for those.
|
|
|
|
|
|
Kent Sharkey wrote: Yeah, you couldn't do that with 3-1/2's, but I couldn't think of a joke for those.
No, but you could punch another hole to go from 720K to 1.44M. (I probably still have the punch somewhere in my basement.
|
|
|
|
|
Gizmodo wrote: while some systems may only require one floppy disk of updates, others could require as many as eight floppy disks. Doom came on floppy disks, so you know what that means... Autopilot and Doom!
|
|
|
|
|
The PORTL device is AI powered – and displays holograms that can chat to you in a booth Is it bigger on the inside?
AI powered. Suuuuuuurrrrre
|
|
|
|
|
Just ahead of its expected public preview of its Dataflex low-cod-no-code platform for Teams, Microsoft has run into trademark issues. Good thing they checked before printing up the T-shirts
|
|
|
|
|
Are they trying to get Google's record on fastest drop of something?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Always *fun* to hear something you've never heard of being abandoned.
|
|
|
|
|
Kent Sharkey wrote: low-cod-no-code platform
Sounds a bit fishy to me!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Google leverages the massive scale of Android to do phone-based earthquake tracking. This earthquake brought to you by YouTube Premium!
|
|
|
|
|
My milkshake brings all the boys to the yard...
|
|
|
|
|
Microsoft President and co-author of a New York Times bestseller explained why the world urgently needs a Digital Geneva Convention and a Hippocratic Oath for software engineers. First: do no eval()
|
|
|
|