COBOL requires that a variable that is defined with LIKE be defined after the variable upon which it is patterned. This compiles:
This does not:
This means that there is no way for a working-storage variable to be defined like a linkage section variable. Or am I mistaken?
Code:
01 AAA pic x(20). 01 BBB like AAA.
Code:
01 BBB like AAA. 01 AAA pic x(20).
Comment