ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Same table and fieldname in RPGLE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Same table and fieldname in RPGLE

    Hi there

    Have the following problem. Our application still runs in RPG. Now we wanna convert it to RPGLE which is working fine. We even can compile all the programms. But as soon as we call the, they dump. What I found out is, in RPG you can have a table and field with the same name, but in RPGLE not. Let me explain:


    Field: XX = 24 character (aplpha)

    Contains:
    -> "AABBCCDDEEFFGGHHIIJJKKLLMM"


    Tabel: XX = 12 elements, 2 character (alpha)

    Should contain:
    -> XX(1) = "AA"
    -> XX(2) = "BB"
    -> XX(3) = "CC"
    -> XX(4) = "DD"
    -> XX(5) = "EE"
    -> etc.


    => This is working correctly in RPG but not in RPGLE, what can I do about that? Does someone has any suggestion? The problem is, in RPGLE i can compile it but then I get a dump. Why is that? Do I have to compile it in a special way or what? The only way to solve it is to have a different tabel and field name. But this is not the solution for us, we have about 5000 programms ...

    Thanks so far

  • #2
    Re: Same table and fieldname in RPGLE

    Are you sure this is the actuall problem? RPG can be defined to ignore decimal
    data errors while RPGLE can not.....If I remember back to conversion times our biggest problem was invalid decimal data and this caused the programs to dump.

    May we see some of the joblog?
    If you convert it to a text file and attach it that would be best.

    Please modify your profile so we know where you are from...Just state/district country ......Thanks


    Take care
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Same table and fieldname in RPGLE

      Hi there

      Would like to add the joblog, but just have it in german. Can you let me know how i change temporary the language (just for this session) into english?

      Thanks

      Comment


      • #4
        Re: Same table and fieldname in RPGLE

        We can translate hunks at a time with


        thanks
        Jamie
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: Same table and fieldname in RPGLE

          As I understand your problem, you have a field called XX and a table called XX.

          I think you will have to rename one or the other. Probably rename of the field is the best way to go.

          Comment


          • #6
            Re: Same table and fieldname in RPGLE

            Yes that's correct. Same tabel-name and same field-name. But the rename of the field is a lot of work. There isn't just one programme, we have about 5000. So if you have to do it in each one ... Is there probably a way how to convert the RPG into RPGLE that they work correctly?

            Thanks

            Comment


            • #7
              Re: Same table and fieldname in RPGLE

              1. You could write a a program that reads the source and changes the field name. This would require a little more setup work, but after that could be automated.

              2. Another alternative that's less work than renaming fields.
              Create a logical file with the same format name and key as the physical file. Then change the filename in the RPG pgm to the name of the logical. Still means modifying every source member, but likely fewer changes than field names.

              Comment

              Working...
              X