After the initial call to the preprocessor, subsequent calls return with one of the following:
The value in resp-main is used to signify what is being returned; additional information might be placed in resp-more and/or buffer. The values of resp-main are:
Value | Description |
---|---|
0 | The source file has been completely processed and there is no further input. buffer and resp-more are ignored. |
1 | buffercontains a new line that was added by the preprocessor and which was not in the original source code. resp-more optionally contains the position of the verb in the original source line that is being replaced. The line added by the preprocessor must not be a comment. |
2 | buffer contains a line in the original source code which is to be ignored by the Compiler. resp-more is ignored. |
3 | buffer contains a line in the original source code which contains the start of a COPY statement that is about to be expanded by the preprocessor. resp-more contains the position of the statement on the line. |
4 | buffer contains a line in the original source code which contains the continuation of a COPY statement. resp-more is ignored. |
5 | buffer contains a warning message inserted by the preprocessor. This must have the format of a comment line (that is, the value "*" in the indicator area of the source line). resp-more is ignored. |
6 | An unrecoverable error has occurred; this forces the Compiler to abort and enter the COBOL Editor. In such a case, a message of up to 70 characters might be written to buffer and this is displayed on the bottom line of the Editor. resp-more is ignored. |
7 | An error has occurred; this forces the Compiler to increment its internal error count. All error classes might be specified by using resp-more. The contents of buffer are ignored. |
8 | This value is generated by the CP Preprocessor. |
9 | This value is used when the CP Preprocessor is in use. |
10 | Identical to 11, below. |
11 | buffer contains a new line added by the preprocessor which contains the start of a COPY statement that is about to be expanded by the preprocessor. It is used when the COPY statement is not unique on a line or the original text was not a COBOL COPY statement. resp-more contains the position of the COPY statement on the line. |
12 | buffer contains a new line added by the preprocessor which contains the continuation of a COPY statement. resp-more is ignored. |
13 | Causes the Compiler to return information about its directive settings. The required directive might optionally be placed in buffer; resp-more is ignored. |
Not base level:14 | This value is similar to 10 and 11 above, except that it indicates that the original source contained -INC or ++INCLUDE. |
Not base level:17 | An error has been detected. buffer contains a message that the Checker outputs. |
32 | buffer contains a line from the original source code which has not been modified by the preprocessor. |
33 - 64 | These values are generated by the CP preprocessor. |
128 | The end of a copybook has been reached. buffer must be empty. |