Rule Definition
The variable that contains the IOSTAT return code value must be tested to ensure properly handling of any errors in the read/write that may have occurred. Dont assume that the operation is successful.
Remediation
Make sure that all variables containing the return code value for a read, write or open opetation are actually tested to make sure the these operations are successful or not.
Reference
IOSTAT= ios is an input/output status specifier that specifies the status of the input/output operation. ios is a scalar variable. When the input/output statement containing this specifier finishes execution, ios is defined with: A zero value if no error condition occurs. A positive value if an error occurs.
Related Technologies
Technical Criterion
CWE-252 - Unchecked Return Value
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.