RPG Ports from AS/400 to Linux?
Spacemonkey
asks: "So, IBM has finally ported Linux to run on their veritable plethora of hardware. Sounds like a real solid commitment to OSS, right? Well, the devil's in the details, however. After spending several hours searching on the Internet, I could not find one single implementation of the RPG ? environment on Linux. So IBM really wants to run Linux on their machines, but what if you want to run your AS/400 applications within the Linux space instead of OS400?"
"So now come the other questions, fast and furious:
- Is it possible to run the RPG environment within Linux?
- Can it be done on x86 hardware?
- Are there any legal restrictions on doing the port?
- If it has been done, where's the beef?
RPG can be converted into COBOL using a simple Perl script; from there you can use GNU COBOL to compile it. I've done this with our businesses payroll program, now we run it on a cluster of Linux machines, we used to use an AS/400. Now we donated the AS/400 to a local school and couldn't be happier... personally I find Linux easier to use and more reliable than propetary OS400.
I think you might just be SOL. Does RPG run on _any_ other platform besides OS/400? I know it was used by Digital way back, but I honestly can't say I've seen it on any other platform.
... Hmmm... Convert an entire library of RPG programs to a different platform and re-write in a new language, now wouldn't _that_ be a project?
On the other hand, IBM may port it over one of these days. Until then you're probably stuck either:
1: Not running linux on your ISeries/AS400
2: Running linux LPAR'ed next to OS400
3: Getting real and just buying a seperate Linux box to run those Linux apps (which is, I know all too well, not always a viable choice for political or financial reasons)
Alternately you could re-develop everything using any of the variously popular programming languages available on the Unix/Linux platform: Perl, Python, C, C++, ObjectiveC, Java, Lisp, Scheme, Dylan, Prolog, Cobol, Smalltalk, Fortran, Ruby, Rebol, PHP,
"But actually trying to use m4 as a general-purpose langage would be deeply perverse" --ESR
Look at Unibol(36/400) or Baby(36/400)...
... you get the idea.
These software packages are "complete" OS envoriments, running under windows or unix.
-or-
Look at Lansa...
Designed in the AS/400 world, look is CLish. But can deploy into client/server -- win/400, win/sql, web/400, web/sql.
Will IBM support RPG under Lunix? My guess is no. RPG and the supported CL would all have to be supported (see above) then why not as/400 cobol, c,
If you are wanting to leave the 400. Look at the above. If you are wanting to mix Linux into a as/400 shop: LPAR and use the best in both worlds.
If the Linux programs you run will also run under AIX, you could use PASE to run them on the iSeries.
I am the only one who jumped to the article thinking that some guys ported role playing games to the AS/400 ?
Let me assure you it is one of the most complicated and difficult games you may ever play. The goal is a correct report - and in the past 35 years noone has yet achieved it.
Personally I think, RPG is worse than Cobol as far as a programming language goes. It has the complexity (almost) of C and absolutely NONE of the benefits.
If you are going to make the change from OS/400 to Linux, convert your programs to C or even COBOL as suggested earlier. Or continue running it under OS/400. OS/400 is a fine OS regardless of it not being Linux.
If you want/need to change to Linux it is for a reason, and that reason is almost surely to be written in C, so make a full change.
It seems silly to me to change OSes and want to run the exact same programs that (should) run fine under OS/400. Maybe if you could explain WHY you need to change, suggestions would be a little easier.
Vertical
72 CD D7 52 D0 7E D8 47 44 91 D5 84 D1 59 F1 A9-This is my 128bit integer. There are many like it, but this one is mine.
The comforting howl and warmth of the System/36.
The soothing glow of the green screen with the login prompt permanently burned into the screen.
The reassuring, desk rattling thud of the keyboard solenoid.
The green bar spewing as the 3000 line report prints one line per page.
The massive template worksheets and counting tiny squares for hours on end.
Those were the days......
Whoa!
Whoa!
Whoa!
Bad trip! Did someone slip a lid into my coffee??
Having been a System/38,AS/400,iSeries developer for ten+ years I have often thought how cool it would be for IBM to supply the RPG/COBOL/CL/DDS compilers on Linux and allow the low end AS/400s to slowly fade. I never bought into companies moving their AS/400 stuff to another vendors platform but an open platform would be just the ticket. If someone is approaching IBM to do this approach the Linux or Java teams not the AS/400 team :-)
:-)
Google provides some good links for RPG to COBOL and JAVA. There is also the option of Baby/ISeries. The GNU RPG compiler has been a bit of a disappointment.
My personal preference would be for a convertor to take RPG/COBOL/CL/DDS and spit out either JAVA or C and SQL. Actually I wouldn't mind doing this but I'm not going to do it on my own time, hint
Hell, I first parsed it as blowing a hole through an old IBM dinousaur with an RPG-7 or the like so you could see your linux server from your office without herniating yourself moving the IBM kit. :-) Then again, I haven't had any coffee yet this morning...
News for Geeks in Austin, TX
especially given the linux compatibility push ibm has made with aix recently.
does RPG not run on anything but OS/400 because:
it is tried to a DB?
(substitute PostgreSQL, InterBase, etc.)
tied to the 400 (OS or Hardware) and (Database or Objects)
It has ACLs on everthing, right?
Is it one of those data dictionary OSes (pick)?
I once worked on a project moving 4.5 million lines of RPG/CL to AIX/Oracle. We converted all the RPG
into an internal language and then converted that into C++. It was'nt pretty but it worked. OS/400 has some strange features of sharing memory/files/databaees etc between separate programs that was hard to map into the Unix/Oracle world. I am sure the same concept could be used for Linux as AIX.
I find it hard to believe that PC hardware could be more reliable than the solid-as-a-rock iSeries. PC hardware has nowhere near the redundancy, integrity, or build quality of those systems. Neither crash often, though I've seen "kernel panic" much more often than a serious machine dump. You could argue that linux on PC hardware is cheaper, but you're completely off base with the "more reliable" statement.
Eraserhead RPG compiles RPG/II and RPG/III code on Linux. I believe that it goes through an intermediatery language (C?) first. RPG/IV could in theory be ported, but given the high use of APIs these would need to be brought across as well. I have never actually used the compiler (all of my code is in RPG/IV) and I can't find the homepage but you can get it from tucows at http://linux.tucows.com/system/preview/7922.html Glad to see so many 400-savvy people hang out here!
I know of at least two companies that use non-native RPG compilers on Linux. I can only remember one's name. http://www.open-rpg.com/ by CrossWorks. I attended the COMMON conference in Minn, MS last October. The Open RPG salesman said that you can take RPG code and run it through a Linux compiler and get executable object programs. I have not used it myself, but I looks as if some thought went into it. I don't know if the compiler can handle SQL style access. I do know it can handle basic record level access. Hope this helps. maquaro
What I am I once was. What I now become I long to be. Life is a journey not a destination.
As long as they port RuneQuest, Stormbringer, and Villains & Vigilantes to linux, that's all the RPGs I need on my AS/400. That's what this topic is about, right?
Hopefully, we can finally advance levels without calling IBM and giving our support contract number.
Hold on just a sec... Lemme find those ten-sided dice. I feel a Idea roll coming on...
Democracy. Whiskey. Sexy. Pick any two.
Its kind of a mixed bag. RPG as a language could be implemented as a rpg2c converter. However if you are talking RPG/400 that may be diferent. IBM put in specific stuff for them. for example database access was built into the machine. Therefore; was part of IBM's implementation of RPG.
Could it be done? probably. The AS/400 O/S was implemented as part machine language and part PL/1. There was no CPU in the conventional (read PC) sense in a AS/400, more like a software (microcode) emulation. It might even be possible to run native code binary programs without recompiling. When we upgraded from the S/38 to the AS/400 we only recompiled our code.
The biggest thing would be to emulate the archetecture. For example how screens are handled. Since the AS/400 is a batch proceessing system. It would send data and forms to a controller unit (read node) you would then interact with the controller unit (not the main machine) with a dubmb terminal. Then when you pressed submit it would send all the data back to the main unit for processing. Doing something like file trasfer seems simple until you try to do a program like kermit. There is no such thing as a interrupt on a AS/400.
There were some things I liked about the AS/400 model. Queues for instance (both job and print) you could see what was ready to go, what was running, you could pause, start, resort,move things around very easily. You had lots of control over what was happening. Print queues would tell you what kind of paper needed to be in a certain printer for a print that was ready to go. You could do things like 'print all my taxforms first'
Would it be worth it? depend on what you are doing. If you just want to translate RPG/400 code to somthing more to your likeing, that might be worth it. To totally emualate a RPG/400 & AS/400 in linux would take IBM to do it right.
make Linux, not Microsoft. sin(beast) = -0.809016994374947424102293417182819
asdasd?