BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
nit123
Obsidian | Level 7

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

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

9 REPLIES 9
ballardw
Super User

Please post log with the code and the error message.

 

 

nit123
Obsidian | Level 7

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

 

ballardw
Super User

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.

nit123
Obsidian | Level 7

it was a zipfile and i extracted it in a folder

Ksharp
Super User
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 .
nit123
Obsidian | Level 7

@Ksharp .sasview files

Ksharp
Super User
If that was a SAS VIEW file, just double click it in SAS and it will be open ,no need other SAS code .
nit123
Obsidian | Level 7

getting the above msg

 

error.png

Ksharp
Super User

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 .

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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