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 and a second control program, wherein the first control program comprises a first data element that describes a program state of the first control program and comprises at least one first pointer element of a first pointer type that references a first pointer object, wherein the second control program comprises a second data element that describes a program state of the second control program and comprises at least one second pointer element of a second pointer type that is configured to reference a second pointer object, and wherein the first data element is stored in a first memory area and the second data element is stored in a second memory area of the controller, the method comprising: identifying the first pointer element and the second pointer element as pointer elements that are associated with one another by way of a first relationship in a first pointer identification step, wherein the first relationship implies that the first pointer element and the second pointer element each comprise identical functions in the first control program and in the second control program, mapping the first pointer element to the second pointer element in a pointer migration step, the pointer migration step comprising: identifying the first pointer object referenced by the first pointer element in a first object identification step, identifying an object associated with the first pointer object as the second pointer object in a second object identification step, determining a memory address of the second pointer object in a first address determination step, and writing the determined memory address of the second pointer object to the second pointer element as the value of the second pointer element in a first pointer storage step. identifying the first pointer element and the second pointer element as pointer elements that are associated with one another by way of a first relationship in a first pointer identification step, wherein the first relationship implies that the first pointer element and the second pointer element each comprise identical functions in the first control program and in the second control program, mapping the first pointer element to the second pointer element in a pointer migration step, the pointer migration step comprising: identifying the first pointer object referenced by the first pointer element in a first object identification step, identifying an object associated with the first pointer object as the second pointer object in a second object identification step, determining a memory address of the second pointer object in a first address determination step, and writing the determined memory address of the second pointer object to the second pointer element as the value of the second pointer element in a first pointer storage step. identifying the first pointer object referenced by the first pointer element in a first object identification step, identifying an object associated with the first pointer object as the second pointer object in a second object identification step, determining a memory address of the second pointer object in a first address determination step, and writing the determined memory address of the second pointer object to the second pointer element as the value of the second pointer element in a first pointer storage step.