Hello world in the mainframe RPG language on MVS - M126

preview_player
Показать описание


Here is the program:

//HERC01T JOB (SETUP),
// 'HELLO WORLD',
// CLASS=A,
// MSGCLASS=H,
// MSGLEVEL=(1,1)
//HELOWRLD EXEC RPGECLG
//RPG.SYSUT3 DD UNIT=SYSDA
//RPG.SYSUT2 DD UNIT=SYSDA
//RPG.SYSUT1 DD UNIT=SYSDA
//RPG.SYSGO DD UNIT=SYSDA
//RPG.SYSIN DD *
00000H
01010FINPUT IPE F 80 80 READ40
01020FOUTPUT O V 132 132 OF PRINTER
01010IINPUT AA 01
01020I 1 20 HELLO
02130OOUTPUT T 2 LR
02140O HELLO 20
//GO.OUTPUT DD SYSOUT=A
//GO.INPUT DD *
HELLO, WORLD YOUTUBE
//
Рекомендации по теме
Комментарии
Автор

Send it back in 80s when I learn in college, but I forgot syntax, Interesting

bhuff
Автор

Moshix,


Back in the 60's I remember RPG as a replacement for the old accounting machines (407 is what we had). The RPG programmers where I worked had a light board with switches made to help them develop their RPG programs. It might have progressed into a more sophisticated programming language, but back then it was the next step after an accounting machine.


Jim

radio
Автор

You mentioned that RPG is still in use today but it is quite different from what was used in the 1960's. IBM has enhanced it continuously up to the present version which is called RPG Free as it is no longer positional but is free form. The following is a small portion of a larger program.

pslen = 94;
callp crt_mbr (psfile:psmbr:pslen);
$cmd2 = $ovr + psmbr + ')';
qcmdexc ($cmd2:%len($cmd2));
open f04572t;

ctlgrpn = %dec(ctlgrp:8:0);
chain (ctlgrpn) f04572;
dow not %eof;

if firstrec = *on;
b1rt = '1';
b1pr = '01';

chain ('G':kkglba) f0030lc;
if %found;
b1chid = aytnst;
endif;
chain (kkco) f0010;
if %found;
b1cn = ccname;
endif;

AlanBlake-seih
Автор

RPG code always looks scary to me. I'm easily scared by punch cards, I guess... :D Thanks again!

grappydingus
Автор

RPG was improved to be RPG II on the System/34 and System/36. It was substantially improved for the System/38. It became RPG/400 on the AS/400. From System/34 it was possible to do screen I/O also. I programmed the System/38 and AS/400 for about 14 years. When a source entry utility was available it became very easy to do the positional programming.

robertlaw
Автор

I saw a demo of RPG on the System/3 when I was a kid in the early 70's. The programmer would type the program on pre-printed RPG coding forms like this one:, which made adhering to the column formatting easier.
and an operator would keypunch it from the form for the programmer. For the System/3, the cards were a "new", small 96 column card. The 96 column cards never really caught on except for the System/3 and its descendants the S/36, S/38, and AS/400

jackk
Автор

Great for accounting, or running grades and GPAs.

argonwheatbelly
Автор

I drove to another campus in my school days to learn RPG. It was the only programming language course that I hated, I still got an A in the course though. A short time after completing the course, they decided to teach it at my campus. The instructor they hired, heard that I took the class and borrowed my runbook to help him set up the curriculum there. Interesting video however for historical purposes.

billb
Автор

The ideal input editor for RPG would, in addition to the column indicator, would use tab for individual fields and function indicator.

lcarliner
Автор

HI Moshix. Why use a (T)otal line on LR instead of a (D)etail on 01? Just wonderin'. Thanks for the vid. Luv 'em.

semuhphor
Автор

Is there a TSO specially input and editor app for RPG?

lcarliner