@Reeza
So the problem with your first XPT file is that HAVEN put binary zeros into the FORMAT and INFORMAT name fields on the V8 NAME records instead of spaces.
You can fix the XPT2LOC macro to read that file if you just add in code to convert the binary zeros to spaces after they are read.
...
format = input(substr(buffer,pos, 8),$ascii8.); pos+8;
...
informat = input(substr(buffer,pos, 8),$ascii8.); pos+8;
...
format=translate(format,' ','00'x);
informat=translate(informat,' ','00'x);

Another issue I have seen is someone sent a file that had bare $ as the FORMAT or INFORMAT specification in the V9 LABEL record. For those I just blanked them out.
...
format=substr(buffer,name_len+label_len+1,fmtname_len);
informat=substr(buffer,name_len+label_len+fmtname_len+1,infmtname_len);
if format='$' then do;
putlog 'WARNING: Removing invalid ' format=:$quote. 'from variable ' name;
format=' ';
end;
if informat='$' then do;
putlog 'WARNING: Removing invalid ' informat=:$quote. 'from variable ' name;
informat=' ';
end;