In the following example the pointer p1 points to a type definition that contains the buff1 item, not buff2. To fix this particular example, change the move operation to reference buff1 or change the pointer references to work with type2.
... 01 type1 typedef. 03 buff1 pic x(10). 01 type2 typedef. 03 buff2 pic x(10). 01 p1 pointer type1. procedure division. move "xxxxx" to p1::buff2 *> error ...