ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Duplicate Line # in RPG Source Code ?

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

  • Duplicate Line # in RPG Source Code ?

    I came across an RPG Source member with duplicate Line numbers. If I browse the source, it looks OK, but if I view the source code on a split green screen, or via DBU or via SQL, it shows 4 lines of code all with the same line # 1276. How's that possible ?

    Click image for larger version

Name:	RPG_Duplicate_Lines.png
Views:	123
Size:	24.2 KB
ID:	157568
    Last edited by MFisher; June 13, 2022, 03:19 PM.

  • #2
    The sequence number is just text - I guess there are a number of ways it could have happened. If the source was edited and the option to re-sequence on save was not taken then it would never get "fixed".

    Comment


    • #3
      While the typical code editors re-sequence the lines when saving there is nothing that enforces that. These are just tables and there is no unique constraint. Someone may have used a non-standard editor or maybe wrote a program (or sql statement) to edit or add some code, something that doesn't have the re-sequence process the standard editors have built in.

      Comment

      Working...
      X