convert/import sas view tables to data sets

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 13
Accepted Solution

convert/import sas view tables to data sets

[ Edited ]

hi all i have tried the code mentioned in the above doc 

http://support.sas.com/documentation/cdl/en/sqlproc/69049/HTML/default/viewer.htm#n0jov4xsixn4dqn12d...

 

libname new 'C:\Users\nitesh\Documents\My SAS Files\9.4';
filename trans 'C:\Users\nitesh\Downloads\ZIPPROCSQL';

proc cimport library=new infile=trans;
run;

libname sql 'C:\Users\nitesh\Documents\My SAS Files\9.4';

 

but i am getting error in proc stmt. is there any other way to do it.

 

thank you.


Accepted Solutions
Solution
‎12-31-2015 09:59 AM
Super User
Posts: 9,682

Re: convert/import sas view tables to data sets

[ Edited ]

That is because the REAL SAS TABLE which is attached with this VIEW is missing/gone . You can't open this view unless the REAL table is included in .

View solution in original post


All Replies
Super User
Posts: 10,516

Re: convert/import sas view tables to data sets

Please post log with the code and the error message.

 

 

Occasional Contributor
Posts: 13

Re: convert/import sas view tables to data sets

188 libname new 'C:\Users\nitesh\Documents\My SAS Files\9.4';
NOTE: Libref NEW refers to the same physical library as SASUSER.
NOTE: Libref NEW was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\nitesh\Documents\My SAS Files\9.4
189 filename trans 'C:\Users\nitesh\Downloads\ZIPPROCSQL';
190
191 proc cimport library=new infile=trans;
192 run;

ERROR: Invalid file, C:\Users\nitesh\Downloads\ZIPPROCSQL.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE CIMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

193
194 libname sql 'C:\Users\nitesh\Documents\My SAS Files\9.4';
NOTE: Libref SQL refers to the same physical library as NEW.
NOTE: Libref SQL was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\nitesh\Documents\My SAS Files\9.4

 

Super User
Posts: 10,516

Re: convert/import sas view tables to data sets

I would suspect that the issue is either a misspelling or missing file extenstion in your file  C:\Users\nitesh\Downloads\ZIPPROCSQL .

Make sure that the full file name is used. If there is an extension to the file then use it. If the file you want to import is in a folder name ZIPPROCSQL then add it to the filename.

 

Less likely could be a lack of permission  to read the file, check for file properties.

Occasional Contributor
Posts: 13

Re: convert/import sas view tables to data sets

[ Edited ]

it was a zipfile and i extracted it in a folder

Super User
Posts: 9,682

Re: convert/import sas view tables to data sets

That is to say ZIPPROCSQL file is not SAS Transfer File ? so you can't use proc cimport for that file.
Unzip it firstly and see what exactly this file is .
Occasional Contributor
Posts: 13

Re: convert/import sas view tables to data sets

@Ksharp .sasview files

Super User
Posts: 9,682

Re: convert/import sas view tables to data sets

If that was a SAS VIEW file, just double click it in SAS and it will be open ,no need other SAS code .
Occasional Contributor
Posts: 13

Re: convert/import sas view tables to data sets

getting the above msg

 

error.png

Solution
‎12-31-2015 09:59 AM
Super User
Posts: 9,682

Re: convert/import sas view tables to data sets

[ Edited ]

That is because the REAL SAS TABLE which is attached with this VIEW is missing/gone . You can't open this view unless the REAL table is included in .

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 9 replies
  • 897 views
  • 1 like
  • 3 in conversation