ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How to share 1 Display File tomany RPG program?

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

  • How to share 1 Display File tomany RPG program?

    I am new with RPG can u guys help me to solve the problem I encountered.

    Is there any way to share all the DDS field, let say i modify the DDS field in RPG 1, and RPG 2 able to know the changes

  • #2
    The short version is compile the RPG2 program and it will know the changes.
    And for that case all the other programs that uses the display file.

    Of course you have to change the logic in your programs to reflect the modified field.

    If you don't make changes on the field that causes changes in the Format Level Identifier
    of the record where it belongs then you don't need to compile the programs again.
    This might be the case if you only change the editcode. This doesn't change the field.

    Comment


    • #3
      Originally posted by newmoon961 View Post
      I am new with RPG can u guys help me to solve the problem I encountered.

      Is there any way to share all the DDS field, let say i modify the DDS field in RPG 1, and RPG 2 able to know the changes
      Peder has responded on the basis that you are talking about changing the actual file _layout_ I think. i.e. length/data type/ etc of fields.

      But did you perhaps mean the field _content_ when you said "modify the DDS field" ? If so then there are ways of doing this - usually by passing the relevant fields as parameter(s).

      If this is what you meant then please let us know and we will try to advise accordingly.

      Comment


      • #4
        Greetings Newmoon961!

        Maybe I'm either old school, or just anal about these kinds of changes to a singular DDS format used in several RPG(LE) programs... I pretty much recompile every program that uses the new DDS format that is used across several programs. This kind of makes certain that the desired DDS changes do not have an unexpected effect on everything that uses the format in question. Of course, there is always the chance of doing this kind of program maintenance is impractical in your given situation....

        Even if "ALL the other programs" get recompiled outside of the specific singular production version for the program that uses your new DDS changes.... at least you get the chance to find out if there are any unexpected compiler errors within the DDS changes that you make. This kind of a check can result in an easier effort in finding out any future errors that turn up in production programs.

        Just a thought here about making your future programming and/or debugging efforts considerably easier.


        Best Regards and Good Luck!
        Fred Williams

        P.S. And, yes,,, I know that doing this can be a pain in your sit down spots. (grins)

        Comment

        Working...
        X