False positive rpg:S2793 on LIKEREC data structures

False positive on rpg:S2793

SonarQube Server 2026.1

RPG version 3.13.0.7515

This raises a warning on data structures declared with the LIKEREC keyword. According to IBM’s documentation, a data structure defined with LIKEREC is a QUALIFIED data structure. This means that the error should not be raised on any data structure defined with the LIKEREC keyword. This is correctly handled for LIKEDS, but not for the relatively newer LIKEREC.

**free
dcl-ds screen likerec(vendinfo) template; // Warning incorrectly raised on this data structure as it is defined as a LIKEREC data structure

Thanks for the detailed report and the IBM docs link — you’re absolutely right. LIKEREC implicitly makes a data structure qualified, just like LIKEDS, and rpg:S2793 should not fire on it. This is a false positive on our end and we’ll get a fix in.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.