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

Hi all,

 

I'm new to SAS, while I was able to realize the results I want, I found my SAS is running "inefficiently".

 

So for example, I'm trying to get rid of parenthesis and any text inside the parenthesis of a variable (com_up). The new variable is called com_par.

The number of observations are around 19700000, which is a lot I think so should take some time. But today I wait for more than half and hour and the code is still running. I checked my task manager, it says SAS is using only 0.1% CPU.

 

The file is on my google drive but I synchronize it to my local computer. I have 128 gb ram. The code I use is as follows:

data new_db;

set old_db;

com_par = prxchange('s/\(([^\)]+)\)//i',-1,com_up);

run;

I was wondering does this means SAS is not actually working? And is there any solutions on this?

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Running SAS programs accessing remotely-stored data is nearly always slower than local data. I suggest you copy your data to a local drive and do a test run on that source, then compare SAS log run times.

View solution in original post

8 REPLIES 8
Eileen1496
Obsidian | Level 7

I saw the copy of the code in black. I also saw this before and when it finished running there will be blue lines showing me the running time and number of observations. So I think I submit the whole code, but it is really weird in the task manager, only 0.1% CPU used before the result comes out.

PaigeMiller
Diamond | Level 26

Please examine your code carefully. There is a semi-colon missing.

--
Paige Miller
Eileen1496
Obsidian | Level 7

Hi, yes you are right, it is a typo when I post the question. The code has semicolon.

ballardw
Super User

@Eileen1496 wrote:

Hi all,

 

I'm new to SAS, while I was able to realize the results I want, I found my SAS is running "inefficiently".

 

So for example, I'm trying to get rid of parenthesis and any text inside the parenthesis of a variable (com_up). The new variable is called com_par.

The number of observations are around 19700000, which is a lot I think so should take some time. But today I wait for more than half and hour and the code is still running. I checked my task manager, it says SAS is using only 0.1% CPU.

 

The file is on my google drive but I synchronize it to my local computer. I have 128 gb ram. The code I use is as follows:

data new_db;

set old_db;

com_par = prxchange('s/\(([^\)]+)\)//i',-1,com_up)

run;

I was wondering does this means SAS is not actually working? And is there any solutions on this?


I wonder if your "synchronize" means that every time you modify a record on your "synchronized" data set that something is trying to send that change back to the Google Drive. And that link may not be very efficient.

What do your system diagnostics say about network usage? and anything related to Google?

Eileen1496
Obsidian | Level 7

Yes I think I mean that. Because everytime I change anything, I can see google drive is synchronizing the change. By network usage do you mean internet? It is good. I don't think before I finish running this block of code, thus generating the new dataset, drive will synchronize. I used to suspect some of the time is used to download the file from google drive, but I tried all my files, even they are very large, when I click them they open immediately, so I rule out this factor.

SASKiwi
PROC Star

Running SAS programs accessing remotely-stored data is nearly always slower than local data. I suggest you copy your data to a local drive and do a test run on that source, then compare SAS log run times.

Eileen1496
Obsidian | Level 7

I put them completely in a local drive, and it is way faster!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1616 views
  • 1 like
  • 5 in conversation