Thanks for quick replies..
Robert Sample wrote:Be aware, too, that COPY statements do NOT work like most new COBOL programmers think. In your COPY statement, X and W must be variable names or otherwise be delimited by spaces; your COPY statement will not -- EVER -- change WS-XVARIABLE to WS-YVARIABLE since COBOL COPY statements do not work on strings. You could put in your copybook WS-:X:VARIABLE and your COPY statement could change :X: to Y but without the delimiters around it, X will not be changed inside a variable name.
Yes this is the point i missed... The problem is not related with the syntax of COPY command.
I didn't mention in my example, but both X and W are a part of the variables in the copybook.
When i wrote the full variable name, it worked.
Thanks again for your great help.