Hi! Anybody know if SAS Studio is capable of creating XPORT / V5 or V8 Transport file? Studio allows for PROC CPORT options, but there's nothing in its documentation that indicates it has PROC XPORT capability. Please help!!! Much appreciated!!
This code works (I copied the sas data lib into a new lib with the xport engine assigned to it).
libname xportout xport '/home/dp14160/XPORT';
proc copy in=WORK out=xportout memtype=data;
run;
The code worked in SAS Studio, but when I try to export the contents of the newly created library, xportout, I have limited options (csv, xml, etc.). I screenshot those options!
Thanks a bunches! Any help's appreciated!!!
You can create an XPORT file using the libname approach.
libname out xport 'c:\_localdata\temp\test.xpt';
proc copy in=sashelp out=out memtype=data;
select class;
run;
Here's the documentation references:
There's a macro here that indicates V5/V8 that you can try as well.
@anonymous_user wrote:
Hi! Anybody know if SAS Studio is capable of creating XPORT / V5 or V8 Transport file? Studio allows for PROC CPORT options, but there's nothing in its documentation that indicates it has PROC XPORT capability. Please help!!! Much appreciated!!
Thank you for the help!! It's much appreciated. I'll try it after I eat lunch - SAS Studio and an empty stomach is not great
Can you not just try it?
Off the top of my head I can't see any reason why not, xpt is part of Base, so you don't need any other modules. Don't know why you would want to use the format in this day and age, unless its forced on you.
HAHAHA yeah it's for SEND/SDTM protocol for the biopharm industry. Trust, I do not enjoy this very very 'basic' file. I'll try your code after lunch! Thank you for your help - I appreciate it so much!
Yep, thought it might be. Grates on me that format, plain text open file format FTW. They have talked about dataset.xml for years, but nothing yet.
DO NOT EDIT your post. Then we cannot follow the discussion appropriately.
You are not trying to EXPORT the file anymore, as SAS uses that term, you want to download it. If you're using SAS Academcis on Demand there are file size restrictions.
Also, this would copy all files in the library, not just a single data set.
@anonymous_user wrote:
Hi! Anybody know if SAS Studio is capable of creating XPORT / V5 or V8 Transport file? Studio allows for PROC CPORT options, but there's nothing in its documentation that indicates it has PROC XPORT capability. Please help!!! Much appreciated!!
This code works (I copied the sas data lib into a new lib with the xport engine assigned to it).
libname xportout xport '/home/dp14160/XPORT';
proc copy in=WORK out=xportout memtype=data;
run;
The code worked in SAS Studio, but when I try to export the contents of the newly created library, xportout, I have limited options (csv, xml, etc.). I screenshot those options!
Thanks a bunches! Any help's appreciated!!!
SAS Studio is just SAS 9.4 and the documentation, I included in the previous post, seems to imply that it should fully support transport files.
You can verify your SAS version by running:
proc product_status;run;
@anonymous_user wrote:
Yes I know it copies all the files; that's why by specifying memtype, other file types are ignored.
I downloaded the xport file that I made w/ PROC COPY.
I tried* to read the new xpt file with SAS Universal Viewer; SAS Universal Viewer couldn't read it.
SAS Studio *probably* doesn't support xpt; I tried to import the xpt file onto SAS Studio but Studio didn't recognize any of the data inside the file. I can't find a single piece of documentation that verifies that it does support this type of engine.
I used a 3rd party software to convert the xpt file to a csv one, which I was then able to upload to SAS Studio.
I will try the PROC COPY / DATA step code(s) on SAS University when I download the software in the future.
Thanks for all your help.
@anonymous_user wrote:
I understand the implication of that documentation.
Have you actually tried the code(s) on SAS Studio?
Yes, using SAS AoD, and it worked fine. I followed the code in the documentation about how to restore the data.
No issues on my side.
71 libname out xport '/home/XXXXX/Demo1/test.xpt';
NOTE: Libref OUT was successfully assigned as follows:
Engine: XPORT
Physical Name: /home/XXXXX/Demo1/test.xpt
72
73 proc copy in=sashelp out=out memtype=data;
74 select class;
75 run;
NOTE: Copying SASHELP.CLASS to OUT.CLASS (memtype=DATA).
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set OUT.CLASS has 19 observations and 5 variables.
NOTE: PROCEDURE COPY used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 816.65k
OS Memory 27304.00k
Timestamp 05/30/2018 08:58:45 PM
Step Count 61 Switch Count 1
Page Faults 0
Page Reclaims 105
Page Swaps 0
Voluntary Context Switches 11
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 16
76
77 libname out;
NOTE: Libref OUT has been deassigned.
78
79
80 libname in xport '/home/XXXXX/Demo1/test.xpt';
NOTE: Libref IN was successfully assigned as follows:
Engine: XPORT
Physical Name: /home/XXXXX/Demo1/test.xpt
81
82 proc copy in=in out=work;
83 run;
NOTE: Input library IN is sequential.
NOTE: Copying IN.CLASS to WORK.CLASS (memtype=DATA).
NOTE: BUFSIZE is not cloned when copying across different engines. System Option for BUFSIZE was used.
NOTE: There were 19 observations read from the data set IN.CLASS.
NOTE: The data set WORK.CLASS has 19 observations and 5 variables.
NOTE: PROCEDURE COPY used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.01 seconds
memory 904.21k
OS Memory 27820.00k
Timestamp 05/30/2018 08:58:45 PM
Step Count 62 Switch Count 2
Page Faults 0
Page Reclaims 125
Page Swaps 0
Voluntary Context Switches 12
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 272
84
85 libname in;
NOTE: Libref IN has been deassigned.
86
87 OPTIONS NOSYNTAXCHECK;
88 ODS HTML CLOSE;
89 &GRAPHTERM; ;*';*";*/;RUN;QUIT;
90 QUIT;RUN;
91 ODS HTML5 (ID=WEB) CLOSE;
92
93 ODS PDF (ID=WEB) CLOSE;
NOTE: ODS PDF(WEB) printed no output.
(This sometimes results from failing to place a RUN statement before the ODS PDF(WEB) CLOSE statement.)
94 FILENAME _GSFNAME;
NOTE: Fileref _GSFNAME has been deassigned.
95 DATA _NULL_;
96 RUN;
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 463.31k
OS Memory 23720.00k
Timestamp 05/30/2018 08:58:45 PM
Step Count 63 Switch Count 0
Page Faults 0
Page Reclaims 24
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
97 OPTIONS VALIDMEMNAME=COMPAT;
98 OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
99
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.