Method for data migration for a pointer element in the course of a data migration for a program state of a control program of an automation system , wherein a controller of the automation system comprises a first control program (A) and a second control program (B), wherein the first control program (A) comprises a first data element (GA) that describes a program state of the first control program (A) and comprises at least one first pointer element (Z1) of a first pointer type that references a first pointer object (ZO1), wherein the second control program (B) comprises a second data element (GB) that describes a program state of the second control program (B) and comprises at least one second pointer element (Z2) of a second pointer type that is configured to reference a second pointer object (ZO2), and wherein the first data element (GA) is stored in a first memory area (SPA) and the second data element (GB) is stored in a second memory area (SPB) of the controller , the method comprising: identifying the first pointer element (Z1) and the second pointer element (Z2) as pointer elements that are associated with one another by way of a first relationship (R1) in a first pointer identification step , wherein the first relationship (R1) implies that the first pointer element (Z1) and the second pointer element (Z2) each comprise identical functions in the first control program (A) and in the second control program (B), mapping the first pointer element (Z1) to the second pointer element (Z2) in a pointer migration step , the pointer migration step comprising: identifying the first pointer object (ZO1) referenced by the first pointer element (Z1) in a first object identification step , identifying an object associated with the first pointer object (ZO1) as the second pointer object (ZO2) in a second object identification step , determining a memory address of the second pointer object (ZO2) in a first address determination step , and writing the determined memory address of the second pointer object (ZO2) to the second pointer element (Z2) as the value of the second pointer element (Z2) in a first pointer storage step . identifying the first pointer element (Z1) and the second pointer element (Z2) as pointer elements that are associated with one another by way of a first relationship (R1) in a first pointer identification step , wherein the first relationship (R1) implies that the first pointer element (Z1) and the second pointer element (Z2) each comprise identical functions in the first control program (A) and in the second control program (B), mapping the first pointer element (Z1) to the second pointer element (Z2) in a pointer migration step , the pointer migration step comprising: identifying the first pointer object (ZO1) referenced by the first pointer element (Z1) in a first object identification step , identifying an object associated with the first pointer object (ZO1) as the second pointer object (ZO2) in a second object identification step , determining a memory address of the second pointer object (ZO2) in a first address determination step , and writing the determined memory address of the second pointer object (ZO2) to the second pointer element (Z2) as the value of the second pointer element (Z2) in a first pointer storage step . identifying the first pointer object (ZO1) referenced by the first pointer element (Z1) in a first object identification step , identifying an object associated with the first pointer object (ZO1) as the second pointer object (ZO2) in a second object identification step , determining a memory address of the second pointer object (ZO2) in a first address determination step , and writing the determined memory address of the second pointer object (ZO2) to the second pointer element (Z2) as the value of the second pointer element (Z2) in a first pointer storage step . <EOS>