CRITICAL
Rule Definition
One needs to specify the program status data area to ensure that the error and exceptions raised by the RPG program are made available and can be properly utilized by the application.
Remediation
Try to specify Program Status Data Area for every program.
Violation Code Sample
A program status data structure (SDS) can be defined to make program exception/error information available to an RPG program.
The SDS must be defined in the main source section; therefore, there is only one SDS per module.
D PROC_NAME *PROC
D PGM_STATUS *STATUS
D PRV_STATUS 16 20S 0
Fixed Code Sample
D SDS
D PROC_NAME *PROC
D PGM_STATUS *STATUS
D PRV_STATUS 16 20S 0
Reference
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fbooks_web%2Fc092508690.htm
Related Technologies
Technical Criterion
Programming Practices - Error and Exception Handling
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.