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

I initially got an error where the .dat files were not seen when trying to access .dat files in a library, so I created a library using the pull down menu.  The library shows the files in the directory, when I create the file, but they are not there in the explorer after creation, nor are they accessible when called from code.

 

I have referenced the shared drive two different ways, and in both cases you see the files when adding the library, but you cannot see them again.

 

There seems to be a bunch other questions similar, but none of them answer my question.

 

I have not been able to get any data into SAS, and I did my previous assignment in R.  So, far none of the code, even code directly copied from here seems to work..

1 ACCEPTED SOLUTION
12 REPLIES 12
andreas_lds
Jade | Level 19
Are you using sas on demand or university edition? Please post code and log both using the {i} icon in the editor. What are dat-files? The extension dat is used by so many applications, we need more information to help you.
workoutpal
Calcite | Level 5

This is the version of SAS, and I have to remote in with VMWare Horizon Client.

 

I used the New-Library function.

 

Then I tried a few different sets of code copied directly from the books.  But the issue is the files are there when I create the Library, but they are not there afterwards.  They just disappear.

 

Apparently, I cannot upload screen shot files.

 

 

 

workoutpal
Calcite | Level 5

Does not seem to matter the format because none of them are there to see, and none of them load directly.  However, I could easily fix the format in excel if needed.  I think the issue is likely something related to the sharing being seen, but then being lost or something.  I assume these are from Sharma as they are for problems in the text.

 

Junior Executive Attitude Data (Question: 4.6)
------------------------------------------------------------
Observation X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12
------------------------------------------------------------
1 5 2 1 5 2 4 2 3 5 5 4 2
2 3 1 1 2 4 2 1 2 2 4 5 4
3 2 2 2 3 3 3 1 1 2 4 5 2
4 5 4 4 4 1 5 5 5 4 1 1 1
5 1 1 2 5 1 5 2 1 5 5 4 1
6 2 5 5 1 5 1 4 5 2 2 2 5
7 4 5 5 5 1 4 4 5 5 1 1 1
8 3 1 1 3 4 3 1 2 3 4 5 3
9 1 3 3 4 2 5 3 3 5 4 3 2
10 5 5 4 1 4 2 5 5 1 1 2 5
11 1 4 5 4 1 5 4 4 5 2 1 1
12 1 2 2 5 1 4 4 4 5 3 3 1
13 4 3 4 5 2 5 3 3 4 3 2 2
14 5 2 2 2 5 2 1 1 2 5 4 5
15 5 4 3 4 2 4 4 4 5 4 1 1
16 3 5 4 1 4 1 5 5 1 1 5 5
17 2 5 5 3 2 2 4 4 3 1 3 3
18 1 4 5 2 5 1 5 5 1 2 4 5
19 3 3 3 2 5 2 3 3 2 3 5 4
------------------------------------------------------------


Audiometric Data (Questions: 4.8, 5.10, 12.4)
------------------------------------------------------
ID L500 L1000 L2000 L4000 R500 R1000 R2000 R4000
------------------------------------------------------
1 0 5 10 15 0 5 5 15
2 -5 0 -10 0 0 5 5 15
3 -5 0 15 15 0 0 10 25
4 -5 0 -10 -10 -10 -5 -10 10
5 -5 -5 -10 10 0 -10 -10 50
6 5 5 5 -10 0 5 0 20
7 0 0 0 20 5 5 5 10
8 -10 -10 -10 -5 -10 -5 0 5
9 0 0 0 40 0 0 -10 10
10 -5 -5 -10 20 -10 -5 -10 15
11 -10 -5 -5 5 5 0 -10 5
12 5 5 10 25 -5 -5 5 15
13 0 0 -10 15 -10 -10 -10 10
14 5 15 5 60 5 5 0 50
15 5 0 5 15 5 -5 0 25
16 -5 -5 5 30 5 5 5 25
17 0 -10 0 20 0 -10 -10 25
18 5 0 0 50 10 10 5 65
19 -10 0 0 15 -10 -5 5 15
20 -10 -10 -5 0 -10 -5 -5 5
21 -5 -5 -5 35 -5 -5 -10 20
22 5 15 5 20 5 5 5 25
23 -10 -10 -10 25 -5 -10 -10 25
24 -10 0 5 15 -10 -5 5 20
25 0 0 0 20 -5 -5 10 30
26 -10 -5 0 15 0 0 0 10
27 0 0 5 50 5 0 5 40
28 -5 -5 -5 55 -5 5 10 70
29 0 15 0 20 10 -5 0 10
30 -10 -5 0 15 -5 0 10 20
31 -10 -10 5 10 0 0 20 10
32 -5 5 10 25 -5 0 5 10
33 0 5 0 10 -10 0 0 0
34 -10 -10 -10 45 -10 -10 5 45
35 -5 10 20 45 -5 10 35 60
36 -5 -5 -5 30 -5 0 10 40
37 -10 -5 -5 45 -10 -5 -5 50
38 5 5 5 25 -5 -5 5 40
39 -10 -10 -10 0 -10 -10 -10 5
40 10 20 15 10 25 20 10 20
41 -10 -10 -10 20 -10 -10 0 5
42 5 5 -5 40 5 10 0 45
43 -10 0 10 20 -10 0 15 10
44 -10 -10 10 10 -10 -10 5 0
45 -5 -5 -10 35 -5 0 -10 55
46 5 5 10 25 10 5 5 20
47 5 0 10 70 -5 5 15 40
48 5 10 0 15 5 10 0 30
49 -5 -5 5 -10 -10 -5 0 20
50 -5 0 10 55 -10 0 5 50
51 -10 -10 -10 5 -10 -10 -5 0
52 5 10 20 25 0 5 15 30
53 -10 -10 5 25 -10 -10 -10 40
54 5 10 0 -10 0 5 -5 15
55 15 20 10 60 20 20 0 25
56 -10 -10 -10 5 -10 -10 -5 -10
57 -5 -5 -10 30 0 -5 -10 15
58 -5 -5 0 5 -5 -5 0 10
59 -5 5 5 40 0 0 0 60
60 5 10 30 20 5 5 20 10
61 5 5 0 10 -5 5 0 10
62 0 5 10 35 0 0 5 20
63 -10 -10 -10 0 -5 0 -5 0
64 -10 -5 -5 20 -10 -10 -5 5
65 5 10 0 25 5 5 0 15
66 -10 0 5 60 -10 -5 0 65
67 5 10 40 55 0 5 30 40
68 -5 -10 -10 20 -5 -10 -10 15
69 -5 -5 -5 20 -5 0 0 0
70 -5 -5 -5 5 -5 0 0 5
71 0 10 40 60 -5 0 25 50
72 -5 -5 -5 -5 -5 -5 -5 5
73 0 5 45 50 0 10 15 50
74 -5 -5 10 25 -10 -5 25 60
75 0 -10 0 60 15 0 5 50
76 -5 0 10 35 -10 0 0 15
77 5 0 0 15 0 5 5 25
78 15 15 5 35 10 15 -5 0
79 -10 -10 -10 5 -5 -5 -5 5
80 -10 -10 -5 15 -10 -10 -5 5
81 0 -5 5 35 -5 -5 5 15
82 -5 -5 -5 10 -5 -5 -5 5
83 -5 -5 -10 -10 0 -5 -10 0
84 5 10 10 20 -5 0 0 10
85 -10 -10 -10 5 -10 -5 -10 20
86 5 5 10 0 0 5 5 5
87 -10 0 -5 -10 -10 0 0 -10
88 -10 -10 10 15 0 0 5 15
89 -5 0 10 25 -5 0 5 10
90 5 0 -10 -10 10 0 0 0
91 0 0 5 15 5 0 0 5
92 -5 0 -5 0 -5 -5 -10 0
93 -5 5 -10 45 -5 0 -5 25
94 -10 -5 0 10 -10 5 -10 10
95 -10 -5 0 5 -10 -5 -5 5
96 5 0 5 0 5 0 5 15
97 -10 -10 5 40 -10 -5 -10 5
98 10 10 15 55 0 0 5 75
99 -5 5 5 20 -5 5 5 40
100 -5 -5 -10 -10 -5 0 15 10
------------------------------------------------------
Source: Jackson, J.E (1991), A User's Guide to Principal Components, John
Wiley & Sons. New York.


workoutpal
Calcite | Level 5

This shows the location has the files, and it shows that the library is pointing to the location.  However, as the previous shot showed, the files are not there in the Library. 

Kurt_Bremser
Super User

Not one of these files is a SAS dataset. You have one SAS program file (.sas) in there, which you can load into the program editor.

 

You can post screenshots directly by using the "Photos" button. No need to make the detour by converting your pictures to pdf and attaching that.

andreas_lds
Jade | Level 19

Are there any sas7bdat-files in the folder? If not: that's the reason why the library is empty.

Post code as text in the window opened by clicking on the running-man icon.

workoutpal
Calcite | Level 5

Thank you.  This answers the specific question, and provides some insight on using the help interface.  Unfortunately, this does not solve my problem of inputting data.  I wish SAS would just give a preferred input format, and I would make it look like that as opposed to playing with their menus to make it input.

ballardw
Super User

@workoutpal wrote:

Thank you.  This answers the specific question, and provides some insight on using the help interface.  Unfortunately, this does not solve my problem of inputting data.  I wish SAS would just give a preferred input format, and I would make it look like that as opposed to playing with their menus to make it input.


Unfortunately there are literally thousands of ways to create a file. SAS provides tools that are fairly flexible to bringing lots of formats but you pay for that flexibility with a certain amount of complexity.

 

I have used "dat" files that were 1) fixed column text, 2) tab delimited text, 3) pipe (| character) delimited text and 4) named input text where each value appears as variablename=123.45 or Name="John".

NOT my choice, that was the file provided. So having options that would allow reading them was nice as otherwise the text has to be reformatted to something "useable".

 

BTW once upon a time there were a lot of files with DAT extensions floating around that stood for "Digital Audio Tape" and recorded sound. Believe me, those were not going to be easily read by any data system generally.

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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