Overlapping fields in DDS (RPG)
Posted: Thu May 31, 2012 10:49 am
When 2 fields in your DDS overlap, only one of them gets displayed and the other one would be ignored. This could cause "mysterious" errors that does not point you at all at the cause of the error when you run the program.
Say that you've defined the following fields in your DDS:
The code above seem quite innocuous, however when you run your program, it came out with the following error:

The reason is because the literal ' Home Location' (column 5, length = 16) overlaps with the map definition on column 20.
The first overlapping field that does not have an option indicator specified will be displayed, and any subsequent overlapping fields are never displayed.
When you compile your DDS, the compiler will also give a clear warning of overlapping fields, so don't ignore these warnings.

Say that you've defined the following fields in your DDS:
Code: Select all
A*
A 25 5' Home Location'
A 25 20'<<MAP>>'
A 25 20HTML('Type : Map
A Zoom : 15
A Layout.Height : 300')

The reason is because the literal ' Home Location' (column 5, length = 16) overlaps with the map definition on column 20.
The first overlapping field that does not have an option indicator specified will be displayed, and any subsequent overlapping fields are never displayed.
When you compile your DDS, the compiler will also give a clear warning of overlapping fields, so don't ignore these warnings.
