CRITICAL
Rule Definition
The error handling subroutine needs to be specific to prevent the application from unhandled exceptions. These can lead to application halt or unvalidated results. No specifying this on the file declaration part (F-spec) can show that the exceptions are not handled properly.
Remediation
Implement subroutines dedicated to File Exception Handling.
Violation Code Sample
Flog if e k disk
D infds ds
D recname 261 270
D input ds qualified
D rec1 likerec(rec1) overlay(input)
D rec2 likerec(rec2) overlay(input)
Fixed Code Sample
Use following syntax for specifying error subroutine:
INFSR(Subroutine_name)
Or
KINFSR Subroutine_name
Flog if e k disk infds(infds)
D infds ds
D recname 261 270
D input ds qualified
D rec1 likerec(rec1) overlay(input)
D rec2 likerec(rec2) overlay(input)
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.