Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
News

RPG Ports from AS/400 to Linux? 38

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..."
This discussion has been archived. No new comments can be posted.

RPG Ports from AS/400 to Linux?

Comments Filter:
  • Yes it is possible (Score:5, Informative)

    by Anonymous Coward on Tuesday February 19, 2002 @04:31AM (#3030698)
    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.
    • by Jeremiah Cornelius ( 137 ) on Tuesday February 19, 2002 @04:59AM (#3030761) Homepage Journal
      Where do you find this Perl of Wisdom? A link, or even a name might be of assistance.
    • Gee, that must have been a very simple payroll system ;-)

      What version of RPG did it convert (RPGII, RPGIII,
      RPGIV-ILE)? Probably RPGII since it had the
      smallest feature-set.

      Do you have an example RPG program that was
      converted and its associated output? I'd love
      to see it.

      Terry

    • Parent was a thinly-veiled reference to a Beowulf Cluster. Don't think you can just sneak hat stuff by....
    • 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.
    • While it's theoretically possible to convert the source code (it certainly won't be a line-by-line conversion!) with a Perl script, it's incredibly unlikely that the runtime environment got converted along with it. Which means that you may be running (I stress MAY) a single payroll program but you are not running an application.

      Overrides, UPSI, LDA and externally defined files are only some of the things you lost going to Linux. Did I mention losing the integrated DB/2 database?

      OS400 commands follow a reasonable naming convention; it's not burdened with the randomly named legacy set that the various Linuces/Unices have accreted over the years. That makes OS400 easier to learn and use than Linux.

      The remark about more reliable and proprietary is simply a troll and I shan't rise to the bait. A posting i /. doesn't make it so. Please post the measurement you used to compare the AS/400 to the Linux cluster.
      • 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.
    • by Anonymous Coward
      From a blurb in my email news this morning:
      A new tool called RIO (RPG Into Objects) converts RPG source to Java classes or C++ programs and includes a set of support classes that simulates functionality specific to RPG in an object riented
      (OO) kind of way. This makes learning Java or C++ easier and lets programmers retain their business logic. RIO helps you more easily enable your legacy applications for WebSphere development, e-business, or the latest technologies and rogramming techniques. You can get more information on RIO at

      http://www.asc-iseries.com/rio.htm .
  • by smoon ( 16873 )
    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?
  • YES, NO, MAYBE (Score:2, Informative)

    by jackb_guppy ( 204733 )
    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.
    • I googled for Unibol(36/400) and Baby(36/400). Didn't get any hits. Do you have links to info about these?
      • Re:YES, NO, MAYBE (Score:3, Insightful)

        by Cato ( 8296 )
        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.

  • by Anonymous Coward
    If the Linux programs you run will also run under AIX, you could use PASE [ibm.com] to run them on the iSeries.
  • by BigJim.fr ( 40893 ) <jim@liotier.org> on Tuesday February 19, 2002 @10:09AM (#3031530) Homepage
    I am the only one who jumped to the article thinking that some guys ported role playing games to the AS/400 ?
  • Why run RPG? (Score:2, Insightful)

    by vertical_98 ( 463483 )
    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
    • Re:Why run RPG? (Score:3, Insightful)

      by JabberWokky ( 19442 )
      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

      • 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? Odds are you will spend more time figuring out new obscure bugs then you will porting the bits that are truely necessary.
        • 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

  • 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 [yahoo.com] and JAVA [yahoo.com]. There is also the option of Baby/ISeries [calsw.com]. The GNU RPG [nacs.net] 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 :-)

  • by Anonymous Coward
    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
  • 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.

"Engineering without management is art." -- Jeff Johnson

Working...