Wednesday, March 13, 2013

Data step "map"

Image and video hosting by TinyPic
Awesome Map Depicts Manhattan Movie Locations, from alienlovespredator.com
1. Map
A movie fan should have this map in the pocket, if he or she is travelling in Manhattan.
What kind of "road map" do you need to have in mind, when you are preparing your SAS interview questions for DATA Step?
Why do we trouble to have this "road map"?
If you are relatively new to SAS, you have probably written DATA step code; some
works, some doesn't, sometimes you know why, and sometimes you don't.
That's reason you need the map.
You need to know what's inside the DATA step, and how do the components connect to each other.
2. Question
SAS interview questions often focus the following part:
  • data step internals (compile, execute, PDV)
  • read/write of SAS and non-SAS data
  • declaratives
  • arrays
  • fuzzy merges (IN = variables, BY groups)
  • data _null_
The interviewers typically ask questions that demonstrate an understanding of the above concepts.
Last time we briefly mentioned about "Preprocessing" of the macro, and asked a question related to PDV.
Now let's check whether you have done your homework.
Where shall we insert in the following figure (from SAS website) these components:
  • Data Set
  • Input Buffer
  • Program Data Vector
Think about it before you scroll down to the answer!
Image and video hosting by TinyPic
3. Answer 
They should be right below the input Stack.
Image and video hosting by TinyPic
More details figure can be found from:
An Animated Guide: The Map of the SAS® Macro Facility
Image and video hosting by TinyPic
We will dig into data step later.
Thank you for coming to my blog!
From Bancova.com

No comments:

Post a Comment