You can generate a complete listing of compiler diagnostic messages with their explanations by compiling a program that has the program-name ERRMSG.
You can code just the PROGRAM-ID paragraph, as shown below. Omit the rest of the program.
Identification Division. Program-ID. ErrMsg.