BookmarkSubscribeRSS Feed
lic054
Calcite | Level 5

 

Hi there, 

 

Using the following code, the file psrai_merged_noidnew.sas7bdat created can not be opened in SAS 9.4 
Can anyone tell if it's a problem of the codes below, or other issues? How can the codes be modified if so? The data set to_share2 works fine in SAS. 
 
libname library "C:\CTS - backup - Aug16_2016\CSC\2011\data\share" ;
data library.psrai_merged_noIDnew;
  set to_share2; 
run;
 
Thanks!
Li
4 REPLIES 4
Reeza
Super User

Your code is backwards - which means you may have destroyed your dataset.

 

Data OUTPUT_DATA<- this is the data set(s) CREATED;

SET INPUT_DATA; <- This is the data set(s) USED;

 

Your code should be:

 

libname library "C:\CTS - backup - Aug16_2016\CSC\2011\data\share" ;

data to_share2;
  set library.psrai_merged_noIDnew; 
run;
ballardw
Super User

Please post the log of the code you ran with the LIbname and data step.

Do you get any error message in the log?

If the data set to_share2 was made for a different operating system there may be issues with conversion.

lic054
Calcite | Level 5

Here is the log related to the codes I previous posted. These codes are at the end of a longer SAS file. Also, there are some comments in my codes. It seems that the new file psrai_merged_noIDnew is created, but don't know why it can't be opened in SAS. If it's an issue of OS, how can I fix that? Thanks!

 

8575 libname library "C:\CTS - backup - Aug16_2016\CSC\2011\data\share" ;
NOTE: Libref LIBRARY refers to the same physical library as TMP1.
NOTE: Libref LIBRARY was successfully assigned as follows:
Engine: V9
Physical Name: C:\CTS - backup - Aug16_2016\CSC\2011\data\Share
8576
8577 *export SAS format - not being able to open sas file generated - have to figure out if it's
8577! sas versin or what
8578 can try to generate the SAS file correctly by opening SAS, importing the CSV and then saving
8578! it some other way;
8579 data library.psrai_merged_noIDnew;
8580 set to_share2;
8581 run;

NOTE: There were 1000 observations read from the data set WORK.TO_SHARE2.
NOTE: The data set LIBRARY.PSRAI_MERGED_NOIDNEW has 1000 observations and 727 variables.
NOTE: DATA statement used (Total process time):
real time 0.54 seconds
cpu time 0.51 seconds

 

 

Reeza
Super User

@lic054  You don't explain how it can't be opened or show where you're trying to use the data, only that it was created.

 

Please explain how you can't open it, if you get an error message include error message and log.

If no error message pops up check your log.

 

The OS shouldn't be an issue, you'll at worst get a CEDA (Cross Environment Data Access) note.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 1057 views
  • 0 likes
  • 3 in conversation