BookmarkSubscribeRSS Feed
himalayancat
Fluorite | Level 6

Hello All,

for example ,when i write below code,

/*********pgm-1*************/

Data get_data;

var1=2+3;

run;

/*******pgm-2**************/

Data have_data;

set get_data;

run;

proc freq data=have_data;

table var1;

run;

 

/****************************/

## i understand SAS is written in C and it compiles everything to Machine languages??. i don't understand what happens after that as below...

Q1: is the ComputatIons in pgm-1 is done by SAS application(for example BASE SAS ,SAS EG etc) itself? for example in Microsoft excel 2+3=5 by itself   or does it go to ALU in CPU in both Scenarios??

Q2: in pgm-2, because "get_data" is already a sas data set, does it have to go and come through ALU again(convert to binary) or SAS will understand it a just pulls by itself to create new data set??

Q3: is any computing done by SAS applications itself?  if not, is SAS application just a interface between my data and Computer?

Q4: if not, whats the whole point of having an application if everything is thrown back to ALU?

 

i am new and i am curious.Please suggest.

 

Thank You,

 

3 REPLIES 3
LinusH
Tourmaline | Level 20
My understanding is that most part of SAS Foundation I written in C, but I'm not sure how this affects your questions.
For Q1 I would say the calculation (data step logic) is performed by Base SAS.
Q2 - the CPU is involved even when moving data, but not sure what you are asking here. PROC FREQ again is performed by modules in Base SAS.
Q3, define application. If you mean EG, SAS Studio or DMS SAS, the general answer would be no (meaning data operations).
Q4, you said it yourself, as an interface...?
Data never sleeps
himalayancat
Fluorite | Level 6

HI LinusH,

Thank you twice, one for the below 🙂 

 

what i don't understand are follows,

1.

data have_data;

var1=1+2;

run;

suppose,

1=0001--------compiled in sas

2=0010--------compiled in sas

1+2=0011----not sure if the summation total ,say here "3" is already generated by SAS or computer's CPU

 

 

/***********************/

2.

-You mentioned "proc freq" procedure is done inside sas modules

-is this same for overall proc-procedures/step

/***********************/

3.

"define application. If you mean EG, SAS Studio or DMS SAS, the general answer would be no (meaning data operations)."

 

Q: So data operations are handled by BASE SAS but not SAS EG?

 

 

Kurt_Bremser
Super User

I suggest you start by trying to understand what a compiler is and what it does.

Then the sentence "The data step is compiled in time from the text, while procedure steps use pre-compiled modules" will make sense to you.

In the end, EVERYTHING that a computer does is done by feeding machine code to the CPU (the ALU is just a part of the CPU).

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