- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello, new to SAS. Can anyone help me out? I'm trying to import an XPT file into my Work Library. I keep getting errors and I'm not either being able to understand other posts or my issue doesn't seem to be addressed. In short, I'm frustrated. I tried the following code:
libname a '/sasem/sasworks/SAS_workxxxxxxa/SAS_workxxxxxxa/Work'; libname xptfile xport "C:\Users\xxxxx\Documents\Work\Documentations - xxxxxxxxxx\[filename].xpt" access=readonly; proc copy inlib=xptfile outlib=a; run;
And I get the following error (I put xxxxx's to shorten the paths):
1 The SAS System 12:04 Monday, April 22, 2019 1 ;*';*";*/;quit;run; 2 OPTIONS PAGENO=MIN; 3 %LET _CLIENTTASKLABEL='Program'; 4 %LET _CLIENTPROCESSFLOWNAME='Process Flow'; 5 %LET _CLIENTPROJECTPATH=''; 6 %LET _CLIENTPROJECTPATHHOST=''; 7 %LET _CLIENTPROJECTNAME=''; 8 %LET _SASPROGRAMFILE=''; 9 %LET _SASPROGRAMFILEHOST=''; 10 11 ODS _ALL_ CLOSE; 12 OPTIONS DEV=PNG; 13 GOPTIONS XPIXELS=0 YPIXELS=0; 14 FILENAME EGSR TEMP; 15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR 16 STYLE=HtmlBlue 19 NOGFOOTNOTE 20 GPATH=&sasworklocation 21 ENCODING=UTF8 22 options(rolap="on") 23 ; NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR 24 25 GOPTIONS ACCESSIBLE; 26 libname a '/sasem/sasworks/SAS_xxxxxxxx/SAS_xxxxxxxx/Work'; NOTE: Library A does not exist. 27 libname xptfile xport "/sasem/sasdir/config/Lev1/SASApp/C:\Users\xxxxxxx\Documents\Work\Documentations - xxxxxxx\[filename].xpt" access=readonly; NOTE: Libref XPTFILE was successfully assigned as follows: Engine: XPORT Physical Name: /sasem/sasdir/config/Lev1/SASAppPrd/C:\Users\xxxxxxx\Documents\Work\Documentations - xxxxxxx\[filename].xpt. 28 proc copy inlib=xptfile outlib=a; 29 run; WARNING: Library A does not exist. NOTE: Input library XPTFILE is sequential. ERROR: Physical file does not exist, /sasem/sasdir/config/Lev1/SASApp/C:\Users\xxxxxxx\Documents\Work\Documentations - xxxxxxx\[filename].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.00 seconds NOTE: The SAS System stopped processing this step because of errors. 30 31 GOPTIONS NOACCESSIBLE; 32 %LET _CLIENTTASKLABEL=; 33 %LET _CLIENTPROCESSFLOWNAME=; 34 %LET _CLIENTPROJECTPATH=; 35 %LET _CLIENTPROJECTPATHHOST=; 36 %LET _CLIENTPROJECTNAME=; 37 %LET _SASPROGRAMFILE=; 38 %LET _SASPROGRAMFILEHOST=; 39 40 ;*';*";*/;quit;run; 2 The SAS System 12:04 Monday, April 22, 2019 41 ODS _ALL_ CLOSE; 42 43 44 QUIT; RUN; 45
Thanks in advance!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Your code is NOT trying to copy the data from the XPT into your WORK library. To do that you would use OUTLIB=WORK on the PROC COPY command.
Your log shows two problems.
1) The directory you are trying to write the dataset to doesn't exist.
2) The path you are trying to use to reference the XPT file is invalid of the machine that is running SAS.
For both paths you need to use locations that the machine were SAS is running can see. The interactive Enterprise Guide utility runs on a Windows machine but it connects to SAS running some where. In your case you can tell from the log that SAS is running on Unix. So you need to use paths that work on that Unix machine. If the XPT file is only on your PC then you might need to first upload it to the SAS server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Your code is NOT trying to copy the data from the XPT into your WORK library. To do that you would use OUTLIB=WORK on the PROC COPY command.
Your log shows two problems.
1) The directory you are trying to write the dataset to doesn't exist.
2) The path you are trying to use to reference the XPT file is invalid of the machine that is running SAS.
For both paths you need to use locations that the machine were SAS is running can see. The interactive Enterprise Guide utility runs on a Windows machine but it connects to SAS running some where. In your case you can tell from the log that SAS is running on Unix. So you need to use paths that work on that Unix machine. If the XPT file is only on your PC then you might need to first upload it to the SAS server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello. I am having the same problem with him. However, I couldnt upload the XPT file because it says the file is too large. If that's the case, how the I access the data inside that XPT file?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
For the Excel file you probably used the import utility. That will convert the Excel file to a delimited file and upload the delimited.
There should be another EG task for file transfer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So there's some special program our admins use to transfer files. Found out after much hullabaloo. Thanks for your help though - guided me to the right path.