Operating System - OpenVMS
1752795 Members
5815 Online
108789 Solutions
New Discussion юеВ

Re: Copy statement in Cobol

 
Wim Van den Wyngaert
Honored Contributor

Re: Copy statement in Cobol

He's correct. All IDENTIFIERS are replaced. Not all STRINGS.

If you can't change the rapclodt copymember you will not be able to solve this case.
And if you do change it, you will need to add "replacing ==(X)== by ==RAPCLODT==" where there is no replacing clause.

Wim
Wim
Phil.Howell
Honored Contributor

Re: Copy statement in Cobol

MVS is another country
they do thing differently there

The compiler will tell you about any ambiguity in variable names

01 RAP-IN.
05 RAPCLODT-DB-AREA PIC S9(04) COMP.
05 RAPCLODT-DB-RAP PIC X(06).
05 RAPCLODT-ACCT-KEY.

01 RAP-OUT.
05 RAPCLODT-DB-AREA PIC S9(04) COMP.
05 RAPCLODT-DB-RAP PIC X(06).
05 RAPCLODT-ACCT-KEY.

MOVE RAPCLODT-ACCT-KEY TO .
will be flagged by the compiler as an error

MOVE RAPCLODT-ACCT-KEY OF RAP-IN
TO RAPCLODT-ACCT-KEY OF RAP-OUT.
will work

Phil

Cobol Copy
New Member

Re: Copy statement in Cobol

thanks phil.. ur reply was useful.

karthikeyan