- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have a sas.xpt file , how to find the version of the xpt file. i tried proc contents but not much useful, is there any way we can find more information. Thanks for the help
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you have a file with .xpt as the file extension you still need to know what type of file it is. Whether is was created by PROC CPORT or is was created by the XPORT libref engine. Or perhaps the new %LOC2XPT() SAS supplied autocall macro.
Here is a macro you can use that will read the first few bytes of the file and tell you want type of file it is.
https://github.com/sasutils/macros/blob/master/xpttype.sas
/*----------------------------------------------------------------------------
Check file to see what type of transport file it is.
Returns
CPORT for PROC CPORT/CIMPORT file
XPORT for V5 export file
XPORT_V9 for V8/9 export file
SAS7BDAT for SAS dataset
UNKNOWN for any other file
Examples:
%put %xpttype('~/xport.xpt');
%put %xpttype('~/subj.xpt');
%put %xpttype('~/r_lrevw.xpt');
%put %xpttype('~/test1.sas7bdat');
----------------------------------------------------------------------------*/
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The only version information I am aware of that might be in an XPT file would be the version of SAS that created the file. Is that what you are looking for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you have a file with .xpt as the file extension you still need to know what type of file it is. Whether is was created by PROC CPORT or is was created by the XPORT libref engine. Or perhaps the new %LOC2XPT() SAS supplied autocall macro.
Here is a macro you can use that will read the first few bytes of the file and tell you want type of file it is.
https://github.com/sasutils/macros/blob/master/xpttype.sas
/*----------------------------------------------------------------------------
Check file to see what type of transport file it is.
Returns
CPORT for PROC CPORT/CIMPORT file
XPORT for V5 export file
XPORT_V9 for V8/9 export file
SAS7BDAT for SAS dataset
UNKNOWN for any other file
Examples:
%put %xpttype('~/xport.xpt');
%put %xpttype('~/subj.xpt');
%put %xpttype('~/r_lrevw.xpt');
%put %xpttype('~/test1.sas7bdat');
----------------------------------------------------------------------------*/
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content