Do to our installation we are forced to import files from our desktop using the import GUI in SAS VIYA> When I try to import am xpt file I get an error message that the file type is unsupported. I have no problem importing the same xpt files into JMP.
I don't think you want to use the Import function. XPT files are read using a SAS library engine (XPORT), so the approach would be to upload the XPT files you need and then use code to assign a libname to each file.
Example code:
libname data xport "&_userhome/XPT/class.xpt";
proc contents data=data.class; quit;
proc contents data=data.class; quit;
: This code block is using the proc contents
procedure to display information about the contents of the specified dataset. In this case, it's the "class" dataset within the "data" library. This helps you understand the structure of the dataset, such as variable names, types, and formats.
If you have multiple XPT files, you can repeat the libname
statement for each file and then use the appropriate dataset names in subsequent SAS procedures.
Ensure that the path to your XPT file is correct, and replace "&_userhome/XPT/class.xpt"
with the actual path to your XPT file.
The extension XPT has no fixed meaning. So it MIGHT be a file in the SAS V5 Transport format that can be read with the XPORT library engine. But it might be a file created with PROC CPORT that would require using PROC CIMPORT to read. Or it might be a SAS V7/8/9 Transport file create by the %LOC2XPT() macro in which case you would need to use the %XPT2LOC() macro to read it.
I don't use JMP, but perhaps the information that it can be imported by JMP would tell someone that is familiar with JMP what type of file it is.
If the file is not accessible on the machine where SAS (whatever flavor) is running then you need to get the file there first.
So if your site has totally disabled your ability to upload a file then they need to provide some other method for you put the file where SAS can access it.
The IMPORT wizard is not the tool for working with XPT files. It might be in JMP since that is foreign file structure to JMP.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.