I am working with data from the BRFSS and I am trying to get the formats file to run with the actual dataset. I have downloaded the code and files from the BRFSS website, however when I try to use the code I am getting an error: Invalid File. I will paste the code I am using below. Does anyone know what to do about this error?
***********************************************************************************
* FILE NAME: TRANSPRT.SAS *
* DESCRIPTION: THIS PROGRAM CONVERTS A SAS TRANSPORT FILE LOCATED AT <TRANSPRT> *
* LIBNAME, INTO A SAS DATABASE STORED AT <DATAOUT> LIBREF *
* REFERENCES: *
* INPUT DATAIN FILEREF OF TRANSPORT DATAFILE OF COMPLETES *
* OUTPUT DATAOUT.SASDATA SAS DATABASE VERSION OF TRANSPORT DATA AS *
* SPECIFIED IN <TRANSPRT> LIBNAME *
* UPDATED - 02/21/2007 *
***********************************************************************************;
********************************
* Clear Output and Log Windows *
********************************;
DM OUTPUT 'clear' continue;
DM LOG 'clear' continue;
**********************************
* DEFINE SAS ENVIRONMENT OPTIONS *
**********************************;
OPTIONS PAGENO=1 NOFMTERR;
***************************************
* CLEAR EXISTING TITLES AND FOOTNOTES *
***************************************;
TITLE ;
FOOTNOTE ;
RUN ;
******************************************************
* INSTRUCTIONS: *
* SPECIFY PATH OF WHERE TRANSPORT DATAFILE IS STORED *
* SPECIFY PATH OF WHERE SAS DATASET IS TO BE STORED *
******************************************************;
LIBNAME TRANSPRT XPORT 'C:\Users\tuk44889\Desktop\BRFSS2010';
*****************************************************************************
* EXAMPLE: *
* LIBNAME TRANSPRT XPORT 'C:\BRFSS\2010\CDBRFS10.XPT' *
* NOTE: MAKE SURE THE ASTERISK IS REMOVED BEFORE THE WORD LIBNAME AND *
* MAKE SURE THAT THE GREATER THAN AND LESS THAN SIGNS < > ARE REMOVED *
* FROM THE FILENAME STATEMENT *
* THE QUOTATION MARKS MUST BE THERE FOR THE PROGRAM TO WORK *
*****************************************************************************;
LIBNAME DATAOUT V7 'C:\Users\tuk44889\Desktop\BRFSS2010' ;
*****************************************************************************
* EXAMPLE: *
* LIBNAME DATAOUT 'C:\' *
* A SAS DATABASE WILL BE STORED AT C:\SASDATA.SAS7BDAT *
* NOTE: MAKE SURE THE ASTERISK IS REMOVED BEFORE THE WORD LIBNAME AND *
* MAKE SURE THAT THE GREATER THAN AND LESS THAN SIGNS < > ARE REMOVED *
* FROM THE LIBNAME STATEMENT *
* THE QUOTATION MARKS MUST BE THERE FOR THE PROGRAM TO WORK *
*****************************************************************************;
PROC COPY IN=TRANSPRT OUT=DATAOUT;
RUN;
Libname xport expects the name of the transport file, not of a directory where the transport file is stored.
Libname xport expects the name of the transport file, not of a directory where the transport file is stored.
Thank you this worked!
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.