BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jchang53
Fluorite | Level 6

Hi, 

 

I have tried the following code to try to convert the BRFSS 2016 .XPT file to a .sas file:

 

LIBNAME TRANSPRT XPORT '/folders/myfolders/LLCP2016.XPT';

*This is where the SAS data file will be saved;

LIBNAME DATAOUT v7 '/folders/myfolders/sasuser.v94';

PROC COPY IN=TRANSPRT OUT=DATAOUT;
RUN;

 

However, I get an error with the following message in the Log:

 

NOTE: Libref DATAOUT refers to the same physical library as SASUSER.
 NOTE: Libref DATAOUT was successfully assigned as follows: 
       Engine:        V7 
       Physical Name: /folders/myfolders/sasuser.v94
 100        
 101        PROC COPY IN=TRANSPRT OUT=DATAOUT;
 102        RUN;
 
 NOTE: Input library TRANSPRT is sequential.
 ERROR: Physical file does not exist, /folders/myfolders/LLCP2016.XPT.
 NOTE: Statements not processed because of errors noted above.
 NOTE: PROCEDURE COPY used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 NOTE: The SAS System stopped processing this step because of errors.
 
 
I'm using the most recent version of SAS Studio (University Edition) as of 04/11/2018 and VirtualBox 5.2.4 (5.2.8 version was buggy for me) and I cannot figure what I'm doing wrong. Weirdly enough, the BRFSS 2013 .XPT file will run fine with this code, but the BRFSS 2014, 2015, and 2016 will not. 
 
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

I received this answer from the CDC:

 

Dear Mr. Bremser,

Hello and thank you for your inquiry. Dave Flegel here. I am a tech writer working with BRFSS in CDC. I sent your correspondence to the tech crew here. They note that they have been able to use the data set with Windows 10; they have not been able to duplicate the issues that you reported. Over the last year or so, we have received a few inquiries from data users who have had trouble downloading the data sets on Macs (where our team has then recommended using assistance software that can help with the downloading) but we did not hear any specifics about the troubles they were having. 

 

Thank you for bringing this issue to our attention, in case we receive inquiries in the future from data users who encounter related troubles.

 

Sincerely,

 

(name edited out for privacy reasons)

 

 

"Your download of 2016 BRFSS Data (SAS Transport Format) has a not-so-nice problem:

the name of the contained file ends with a blank after the .XPT, which needs an extra renaming step so that the file can be used with SAS. Since this blank is not obvious to most users, they get problems.

(see https://communities.sas.com/t5/SAS-Studio/Converting-BRFSS-2016-XPT-to-SAS-file/m-p/453073)"

 

 

 

 

No comment.

View solution in original post

6 REPLIES 6
Kurt_Bremser
Super User

The log is very clear:

ERROR: Physical file does not exist, /folders/myfolders/LLCP2016.XPT.

so you need to make sure that the file is in your shared folder and that it is named exactly (watch out for upper/lowercase) the way you want to access it.

If in doubt, show a Windows Explorer look of your shared folder.

 

Kurt_Bremser
Super User

PS do not copy that dataset (or any dataset) into your SASUSER. Space within the SAS UE virtual machine is limited. Use a library that is defined in your shared folder instead.

Kurt_Bremser
Super User

Found it. The name of the XPT file ends with a blank (how stupid must someone be to come up with that idea? Well, government workers ...). You need to remove that first before you can import it.

(Extracting the file on Windows with 7zip converted the blank to an underline, so you can immediately see that something weird is going on)

Second oops: since nobody cared to deliver proper attributes in the zipped file, using unzip on UNIX gives you a file with NO permissions set, so you need to do a chmod first so you can read it. Grrmph.

 

PS sent a message to CDC-Info

jchang53
Fluorite | Level 6

Hi KurtBremser,

 

Thank you for your time and your thoughtful messages! After struggling some more I found an easier way to convert the file.... 

 

I renamed the file (getting rid of the space at the end) and moved it to a different folder. The code ran after that! Thank you for your help!!

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         LIBNAME TRANSPRT XPORT '/folders/myfolders/BRFSS2016.XPT';
 NOTE: Libref TRANSPRT was successfully assigned as follows: 
       Engine:        XPORT 
       Physical Name: /folders/myfolders/BRFSS2016.XPT
 74         
 75         *This is where the SAS data file will be saved;
 76         
 77         LIBNAME DATAOUT v7 '/folders/myfolders/sasuser.v94';
 NOTE: Libref DATAOUT refers to the same physical library as SASUSER.
 NOTE: Libref DATAOUT was successfully assigned as follows: 
       Engine:        V7 
       Physical Name: /folders/myfolders/sasuser.v94
 78         
 79         PROC COPY IN=TRANSPRT OUT=DATAOUT;
 80         RUN;
 
 NOTE: Input library TRANSPRT is sequential.
 NOTE: Copying TRANSPRT.LLCP2016 to DATAOUT.LLCP2016 (memtype=DATA).
 NOTE: BUFSIZE is not cloned when copying across different engines. System Option for BUFSIZE was used.
 NOTE: There were 486303 observations read from the data set TRANSPRT.LLCP2016.
 NOTE: The data set DATAOUT.LLCP2016 has 486303 observations and 275 variables.
 NOTE: PROCEDURE COPY used (Total process time):
       real time           43.49 seconds
       cpu time            12.72 seconds
       
 
 81         
 82         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 95         
Kurt_Bremser
Super User

Be very cautious. Your library dataout uses the directory of your SASUSER. Importing several datasets like that can cause your UE to stop working. Use a library that points to a subdirectory of your shared folder (as this resides outside of the UE virtual machine).

Kurt_Bremser
Super User

I received this answer from the CDC:

 

Dear Mr. Bremser,

Hello and thank you for your inquiry. Dave Flegel here. I am a tech writer working with BRFSS in CDC. I sent your correspondence to the tech crew here. They note that they have been able to use the data set with Windows 10; they have not been able to duplicate the issues that you reported. Over the last year or so, we have received a few inquiries from data users who have had trouble downloading the data sets on Macs (where our team has then recommended using assistance software that can help with the downloading) but we did not hear any specifics about the troubles they were having. 

 

Thank you for bringing this issue to our attention, in case we receive inquiries in the future from data users who encounter related troubles.

 

Sincerely,

 

(name edited out for privacy reasons)

 

 

"Your download of 2016 BRFSS Data (SAS Transport Format) has a not-so-nice problem:

the name of the contained file ends with a blank after the .XPT, which needs an extra renaming step so that the file can be used with SAS. Since this blank is not obvious to most users, they get problems.

(see https://communities.sas.com/t5/SAS-Studio/Converting-BRFSS-2016-XPT-to-SAS-file/m-p/453073)"

 

 

 

 

No comment.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 3228 views
  • 1 like
  • 2 in conversation