Why you should care
When creating a new data level, do not add 1 to the previous level. Having not contigus level is easier for inserting an intermediate level later, if needed.
How we detect
CAST Highlight counts one occurrence each time two contiguus levels are detected.
Bad CodeÂ
000180 01 SALES-RECORD. 000190 02 BROKER-REGION PIC 9. 000200 02 BROKER-CITY PIC X(19). 000210 02 BROKER-NAME PIC X(20).
Good CodeÂ
000180 01 SALES-RECORD. 000190 03 BROKER-REGION PIC 9. 000200 03 BROKER-CITY PIC X(19). 000210 03 BROKER-NAME PIC X(20).
References
Coming soon…
About CAST and Highlight’s Code Insights
Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.