The easiest way would be to store the offset in the program being transferred, with:
G10 G90 L2 P1 Xn Yn Zn
Or if you need a macro way of doing it then:
#5221 = X G54 Pos
#5222 = Y G54 Pos
#5223 = Z G54 Pos
Download the macro variable tool from our site below.