sponsored links



No announcement yet.

Converting AS/SET generated programs to standard RPG

  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting AS/SET generated programs to standard RPG

    I have several old RPG programs developed with AS/SET. AS/SET has been discontinued and I have to rebuild those programs.

    I suppose that IT professionals faced with this problem may have solved it, in the past, without having to code the programs manually. Please, if you're one of them, let me know what was your solution.

    Thank you!

  • #2
    Have you checked out https://www.kdpsoftware.co.uk/index....on-to-rpg-free they seem to have done a lot of the heavy lifting for you.


    • #3
      I looked at the link JonBoy provided - AS/SET code had GOTO's? WOW! I would've totally despised that tool. JD Edwards CASE tool did as well - but we haven't used it in over 17 years...


      • #4
        Just about any case tool that generates 3GL code is going to use GOTO - just as the RPG compiler generates GOTO (i.e. branch) operations behind IF/ELSE type operations.

        They can't be avoided at the hardware level - but they can and should be avoided when coding by hand.

        Interestingly the Arcad RPG conversion tool does a good job of getting rid of GOTOs in RPG code. You might now find the resulting code any easier to understand but ...


        • #5
          Can't be avoided at the hardware level - but we're not at that level. I haven't coded a GOTO in 30+ years and before that very very very sparingly. I've had to maintain code with GOTO's and still do on occasion. That's one of those OCD things that I have totally been dogmatic about where I work - on new code there had better not be a single GOTO statement at any time.

          Even on the existing code with the GOTO's I will not code any more GOTO's.


          • #6
            I think you missed my point Rocky - I was taking about what a code _generator_ does. AS/SET generates GOTOs - nobody is suggesting writing the awful things.


            • #7
              I got your point - that's why I originally stated I would have despised that tool... You're right - every CASE tool I've encountered liked GOTO's.... probably written back in the RPG II days when GOTO's were pretty much needed and nobody wanted to upgrade the logic to eliminate them, thus perpetuating the generation of lousy code... not that I have *ANY* opinion on the matter... :P


              • #8
                Generally, the people who produce code generators don't expect you to need to read or maintain the generated code.

                This is just like the way IBM doesn't expect you to look at the underlying generated machine code for your RPG program when you compile it. they expect you to work with the source, not the generated or compiled code. Same with tools like AS/SET. It doesn't matter what it generates, as long as it works. The programmer should only be looking at the source.

                This is where people run into problems with CASE/4GL tools... they try to read and maintain the generated code, and it's usually nasty.


                • #9
                  I understand where you're coming from - but if I'm "tweaking" something I wouldn't want to regenerate all of the code using a toolset - too many opportunities to unintentionally screw something up elsewhere... and besides, I'll admit to being OCD.. poor coding is poor coding regardless