Overlapping fields in DDS (RPG)

Please mark posts as being for RPG or RDMLX (LANSA) developers.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Overlapping fields in DDS (RPG)

Post by tsupartono »

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:

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 code above seem quite innocuous, however when you run your program, it came out with the following error:

Image

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.

Image
Post Reply