COBOL Compiler IGYLI0088-S The "COPY" statement was invalid. Expected "BY" but found "==". ....

Technote (troubleshooting)


Problem(Abstract)

The following statement
COPY MYCOPY REPLACING ==:Y:== BY ==AAA==
REPLACING ==:Z:== BY ==BBB==.
produced this error message:
IGYLI0088-S The "COPY" statement was invalid. Expected "BY", but found "==". The statement was discarded.

Cause

The REPLACING keyword may only be used once.

There may be multiple operand pairs.


Resolving the problem

The diagram of the COPY statement in the COBOL Language Reference shows

 

_ Format ____________________________________________________________
| >>__COPY__ _text-name_ __ ______________________________________> |
|           |_literal-1_|  |_ _OF_ __ _library-name_ _|             |
|                            |_IN_|  |_literal-2____|               |
|                                                                   |
| >__ __________ __ _______________________________________ __.__>< |
|    |_SUPPRESS_|  |            <_____________<____________  |      |
|                  |_REPLACING__|_operand-1__BY__operand-2_|_|      |
|___________________________________________________________________|

The syntax word REPLACING may only be used once; the second use is not interpreted correctly. When the statement is recoded with the second REPLACING removed, ie:
COPY MYCOPY REPLACING ==:Y:== BY ==AAA==
==:Z:== BY ==BBB==.
the statement compiles correctly and both code string replacements are done.

Cross reference information
Segment Product Component Platform Version Edition
Software Development COBOL for OS/390 & VM OS/390, VM/ESA, VSE/ESA, z/OS 2.1, 2.2, 1.1.1, 2.1.2, 2.1.1

Rate this page:

(0 users)Average rating

Document information


More support for:

Enterprise COBOL for z/OS
Compile

Software version:

3.4, 4.1, 4.2

Operating system(s):

z/OS

Reference #:

1206745

Modified date:

2009-02-26

Translate my page

Machine Translation

Content navigation