Reference Modification With OF

COBOL Reference Modification With OF
Syntax to use reference modification for a filed, which exists in multiple groups.

name1 exists in both groups. So if we want to use reference modification for ww-grp1

Above one will not work as it is not correct syntactically.

Basic details of Ref. Modification:

This is used to move a partial value from one variable in to another variable. For example if in a variable declared as a FULL-Name in which first 10 characters are of First-Name and last 10 characters are of Last-Name, then if only first name needs to be moved into another field. it can be done using ref. modification without changing the declaration of the field.


2nd statement can also be coded like

In this case starting from 10th position remaining part would be moved to destination.

For more details and syntax go thru the official IBM pages @

IBM Reference


Leave a Reply

Your email address will not be published. Required fields are marked *