Your incremental program is incorrect. The sum of all those positive Z moves will end up with the tool being about a foot above the part.
As for the absolute program, perhaps the control software is not maintaining the Z position as modal. What that means is you might have to spell out the Z position on every line, even if it is not different than it was previously. In writing such a program incrementally, you'd have to specify Z0 for a line with no Z movement.