Hi,
I have a version 8 transport file (xptv8) and I am using the XPT2LOC autocall macro to convert the transport file into a SAS dataset. Now, previously I was calling this XPT2LOC macro inside SAS Enterprise Guide 8.3 on the SAS On Demand for Academics (ODA) server, which is running SAS 9.4 M8. This was working fine.
However, since then, I have setup my own server, also running SAS 9.4 M8 but running a slightly newer version of SAS Enterprise Guide, version 8.4 (not that it likely matters but worth mentioning). Now on this new system, the code which ran without issues on the ODA server, is still running without any issues appearing in the SAS log but the dataset being output is empty. Below is the code I am running on both systems:
options mprint mlogic symbolgen;
libname source 'C:\Users\myuser\Documents';
%* Convert the XPT file to a SAS dataset;
%xpt2loc(
libref=source,
memlist=_all_,
filespec='C:\Users\myuser\Documents\ae.xptv8');
Now, I have done some testing and looking at the logs for both the system on the ODA server and the system on my new server, and I noticed one minor detail,. Within the XPT2LOC macro there is a dataset which reads in the XPT file using an INFILE statement. This data step processes the variables, defines their length, applies labels, etc. and then it outputs the dataset. The code from my new system (see sas_log_1.txt attached), the data step ends like this
stop;
run;
But in the ODA system (see sas_log_2.txt attached) the same data step ends like this
if _n_=29 then stop;
run;
This 29 is the number of records / observations in my XPT file. Now, this line is determined by the macro variable OBS_MEM0001, which is created in the first and very large data step. In the old ODA system this macro variable revolves to 29, but in my new system it resolves to 0. I believe something is making my new system not see the number of records in my XPT file and I do not know why. Is this a bug? I have attached the xpt I am working with and the SAS logs from my new system. Any insight would be greatly appreciated.
... View more