NUM-MESSAGES attribute

The NUM-MESSAGES attribute on the COMPILER system handle is a read-only attribute that returns an INTEGER specifying the number of messages generated by the most recently executed COMPILE statement.