Nonzero RC from CWPCMAIN utility in Endevor processors
search cancel

Nonzero RC from CWPCMAIN utility in Endevor processors

book

Article ID: 371734

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

CWPCMAIN is an utility used to compile programs with Compuware products like, for example, Xpediter. The utility invokes the compiler and performs additional processing required by Compuware software.

How to deal with nonzero return codes from this utility?

Resolution

Very often, a nonzero RC from CWPCMAIN means that the underlying compilation has failed, for example, due to syntax errors. In this case, the SYSPRINT output from the compiler should be able to determine what is the problem and correcting the errors should be enough to clear the return code.

However, since CWPCMAIN performs additional processing, it might happen that the utility ends with a nonzero RC even though the compilation has been successful.

In this case, the source of information are the messages written to ddname CWPERRM. If the ddname is allocated (either in the processor step or in the JCL), the utility will write its messages to it. Otherwise the utility will allocate it dynamically to SYSOUT=* and write the messages to it.

Therefore, it is important that the processor is coded to keep the messages written to CWPERRM DD, for example, by adding them to the compilation listing stored by utility C1PRINT in the same way as the compiler messages written to SYSPRINT. If this is not observed, it will not be possible to debug errors originating in the CWPCMAIN utility itself.

For example, CWPCMAIN might issue errors like:

PCSIO 054-S  DDIO0068 TARGET DATASET IS FULL .                     
PCSIO 006-S  OUTPUT FILE CWPDDIO OPENMEM ERROR, RETURN CODE=48-044.

These messages indicate lack of space in the file named in CWPDDIO DD, which is intended to store information extracted from the compiler listing. Since this error arises AFTER the compilation has ended, the situation may be quite misleading if the processor does not handle CWPERRM DD correctly