Slashdot Mirror


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?
What good is running Linux on a cavalcade of hardware if you can't get to your 'native' applications? If I can get COBOL, then RPG should be just around the corner..."

15 of 38 comments (clear)

  1. Yes it is possible by Anonymous Coward · · Score: 5, Informative

    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.

    1. Re:Yes it is possible by Jeremiah+Cornelius · · Score: 4, Interesting

      Where do you find this Perl of Wisdom? A link, or even a name might be of assistance.

      --
      "Flyin' in just a sweet place,
      Never been known to fail..."
    2. Re:Yes it is possible by Usquebaugh · · Score: 2, Interesting

      I believe you could do it with a perl or some such script, best with java :-) The runtime environment has equivalents under linux. LDA etc can be simply implemented. DB2 is available under Linux, any RDBMS would work.

      In fact the database port would probably be easiest using java/jdbc, I would imagine you could write the code to do this within a week.

      On the shell front, I think it would be a neat but pointless thing to port QCMD to Linux, instead of starting bash you would start QCMD :-) OS/400 has other shells as well.

  2. SOL? by smoon · · Score: 2

    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.

    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, ... 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?

    --
    "But actually trying to use m4 as a general-purpose langage would be deeply perverse" --ESR
    1. Re:SOL? by Cato · · Score: 5, Informative

      There's at least one RPG compiler for Linux - see http://www.californiasoftware.com/calsw/rvb_unibol 400.htm

  3. YES, NO, MAYBE by jackb_guppy · · Score: 2, Informative

    Look at Unibol(36/400) or Baby(36/400)...

    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, ... you get the idea.

    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.

    1. Re:YES, NO, MAYBE by ScumBiker · · Score: 2

      I googled for Unibol(36/400) and Baby(36/400). Didn't get any hits. Do you have links to info about these?

      --
      --- Think of it as evolution in action ---
    2. Re:YES, NO, MAYBE by Cato · · Score: 3, Insightful

      You need to improve your googling skills - the third item or so on googling for Unibol was http://www.californiasoftware.com/calsw/rvb_unibol 400.htm .

      This is an RPG/400 compiler for Unices including Linux, based on much older Unibol versions (read: mature and reliable!).

      Also, have a look at http://www.well.com/~jax/rcfb/as400.html - links all about Open Source and the AS/400.

  4. Nethack on AS/400 by BigJim.fr · · Score: 4, Funny

    I am the only one who jumped to the article thinking that some guys ported role playing games to the AS/400 ?

  5. Why run RPG? by vertical_98 · · Score: 2, Insightful

    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.
    1. Re:Why run RPG? by JabberWokky · · Score: 3, Insightful
      absolutely NONE of the benefits.

      Except massive amounts of code that have been tested for bugs in the region of hundreds of thousands or more manhours.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    2. Re:Why run RPG? by JabberWokky · · Score: 2
      Yes, but bugs on it's original platform, not the new platform, etc. In the end, if it runs fine where it is, why do you want to change it, what is the benefit?

      Eh, that's where you get into the the reasons why people stick with big *nix and their associated systems - they are stable as hell, and defined to the nth degree. When you reimplement on a new system, you go to the several bookshelves of complete documentation on *every* detail. When you're done with the implementation, it runs everything perfectly. That's why Ada, Cobol and friends are in use.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
  6. soviet percussive maintenance by StandardDeviant · · Score: 2

    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...

  7. Yes there IS an RPG compiler for Linux by Anonymous Coward · · Score: 2, Informative

    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!

  8. If I remember my AS/400 coding by WyldOne · · Score: 2

    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