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

Good afternoon,

 

Somehow any time I download a sample sas file it is being saved in a folder as a .pdf file. How can I remove the pdf association for sas type files upon downloading them? .  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@JosvanderVelden wrote:
On windows you can always change it. There are multiple ways to change the default program that opens a sas7bdat-file (or any other extension). See for example: https://support.microsoft.com/en-us/windows/change-default-programs-in-windows-e5d82cad-17d1-c53b-35...

Back in the days of Windows 7, IIRC, I had one of our IT "experts" change some SAS file associations using Window tools. They never worked right again until I update to the next release of SAS. Just a warning.

 

And now I am not allowed to run the proper SAS program, SAS Deployment Manager and the Manage SAS files task because of security issues. I would have to have one of the IT people run it and tell them what to do...

View solution in original post

9 REPLIES 9
PaigeMiller
Diamond | Level 26

What was the file extension before you downloaded it? Where did you download it from?

 

It is unlikely that you can change a pdf file to a "SAS file", although I'm not really sure what you mean by "SAS file" and it would help if you explained what you mean.

--
Paige Miller
ykassoo
Calcite | Level 5

When I tried to download a SAS file named   sample-1.sas7bdat  , (this is what I meant by sas file)

which contains my school  sample SAS file, upon downloading the file from my university it shows pdf file. 

 

The association for this .sas file type somehow by mistake was changed to .pdf, but I am, unable to remove the file type of .pdf back to .sas file.

ykassoo_0-1692898583423.png

 

Now since the systems sees it as a .pdf file , I am unable to open it in SAS program.

 

Thank you for your help

PaigeMiller
Diamond | Level 26

@ykassoo wrote:

 

Now since the systems sees it as a .pdf file , I am unable to open it in SAS program.


 

I do not agree with this. You should be able to open it in SAS with the proper SAS commands in a short SAS program. What happens when you try to open it in SAS via a SAS program? Please provide details about how you try to open it in SAS via a SAS program, and what happened/what error messages did you get?

--
Paige Miller
Tom
Super User Tom
Super User

You normally do not "open" a SAS dataset.

Instead you just USE it.

If you downloaded the SAS dataset to a file named 'sample_1.sas7bdat' and stored it in a directory on the machine where SAS is running then just make a libref that points to that directory.

 

So if you are running SAS on your PC and you put the file into c:\downloads then the code would look something like:

libname dl 'c:\downloads';
proc contents data=dl.sample_1 ;
run;

 

If the filename is not a valid SAS member name, like your example with the hyphen in the name, then you probably do not actually have a SAS dataset.

 

But you could try renaming it and see if it works. 

 

So change the hyphen or any other strange character to underscore.  Also make sure all of the letters in the filename are lowercase (just in case you are running SAS on a Unix machine).

andreas_lds
Jade | Level 19

What happens, if you double-click the file? Can it be displayed properly by Acrobat Reader?

Please note, that there is a huge difference between the file extensions sas7bat and sas. The first contain data, the later code.

Kurt_Bremser
Super User

Someone (or something) changed the association in Windows to "Acrobat Reader", but the file is still a .sas7bdat SAS dataset file (no pdf here in any way).

Anywhere where you have a SAS installation, you can use this in the usual way (assign a LIBNAME in code and use it). Don't bother what Windows Explorer thinks.

You can change the association in Windows Explorer if you have a suitable application (Base SAS or SAS Universal Viewer) installed.

JosvanderVelden
SAS Super FREQ
On windows you can always change it. There are multiple ways to change the default program that opens a sas7bdat-file (or any other extension). See for example: https://support.microsoft.com/en-us/windows/change-default-programs-in-windows-e5d82cad-17d1-c53b-35...
ballardw
Super User

@JosvanderVelden wrote:
On windows you can always change it. There are multiple ways to change the default program that opens a sas7bdat-file (or any other extension). See for example: https://support.microsoft.com/en-us/windows/change-default-programs-in-windows-e5d82cad-17d1-c53b-35...

Back in the days of Windows 7, IIRC, I had one of our IT "experts" change some SAS file associations using Window tools. They never worked right again until I update to the next release of SAS. Just a warning.

 

And now I am not allowed to run the proper SAS program, SAS Deployment Manager and the Manage SAS files task because of security issues. I would have to have one of the IT people run it and tell them what to do...

ykassoo
Calcite | Level 5

Thanks for the response.  I had to change the association to notepad, since SAS is not on my C: drive.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 1925 views
  • 0 likes
  • 7 in conversation