/*what--learning to apply hash programming concept*/
/*how--we create two datasets master and details.We need to lookup values
from the details ds and include a column into master based on some key variable
that exists in both the ds*/
data master;
infile cards;
input car$ make$;
cards;
800 maruti
alto maruti
santro hyudai
;
proc print;
data details;
infile cards;
input car$ color$;
cards;
800 red
alto black
santro silver
;
proc print;
run;
/* Illustrate the creation of the hash table, the processing of */
/* the Master data set, and the searching of the hash table */
/*creating hash table*/
data results;
length car color $8;
/* Build the hash table */
If _N_ = 1 Then
Do;
Declare Hash MyLkup(HashExp:8,Dataset:'details');
MyLkup.DefineKey('Car');
MyLkup.DefineData('color');
MyLkup.DefineDone();
Call Missing(Car, color);
End;
/* Read an observation from the Master (transaction) file */
set master;
/* Using the value of Code from the current Master file observation, */
/* search the hash table defined above */
Rc = MyLkup.Find(Key:car);
/* Upon a successful search, write an observation to the output data set */
If Rc = 0 Then
Do;
Output Results;
End;
Run;
hi, let us study how to generate different report formats in sas using different techniques and sas procedures..we will also learn how to customize the layout of the reports as per the requirement using the power of sas.. Discalimer-:This blog is for sharing the knowledge that i have gained .i do not calim the ownership of the original content that is included in the blog.SAS is a trademark of SAS ,usa.
Send link to --
SEO Court Directory
myblog
Free Web Directory - Add Your Link
The Little Web Directory
Monster Directory A List Sites
The Little Web Directory
Monster Directory A List Sites