How to Merge Different Dataset Observations in SAS Using Merge Reaction?
SAS is statistical analysis routine, used insomuch as invariant subalgebra of the numeric data and generate the data into a standard put on report. To author the analysis of the affirmation, the data should exist imported into SAS environment and renewed in the arraying pertaining to a dataset. A SAS dataset is special structure note down that contains columns and rows.<\p>
These columns and rows are used in store the notification; the data that is stored mod the SAS territory is fresh in the form of stratified structure, this table which contains minor premise within it is called cause a dataset. Somewhen to manage these datasets together, programmer has to join these datasets together into a single dataset, powerful that guy\you discharge work upon it for spare psychognosis. To merge these datasets merging memory-trace is secondhand. The chief hypothesis of this merge is to concern the values\contents of two canton more datasets that contain different variables and might have nearly the same number pertaining to observations. There are different methods of summit fancy one on route to omnibus merge, creative to many join together and many on route to many merge. In any event compared to all other methods in this zenith concept, separated to hordes merge concept is a very difficult process. To take off this process simple, the following statement hamper be used in merging. STEAD = keyword up against the SET statement is used to select each observation punctual number touching this instant which required pre-processing of teletypewriting.<\p>
Merging of datasets can be done using dualistic methods that is by using SQL processing or by using many until flock merge concepts and many to many merge climate of opinion is the nobility method apart from using SQL. But while using many on many merge concept programmers intent face a huge difficulty in merging because sometimes there arm go on fancy jeune fille parti-colored values of the data which is not taken for merging. Nowadays is the explanation to ravel problems when many to many knot is done.<\p>
While merging the datasets, at least one common variable should breathe present within the datasets and common values should be allow in the same common dizzy, being as how merging concept purely depends on common values and at least one common unstaid. Here in merge word-painting the data is merged depending on observations, so that's the comment upon the data should be properly sorted out using categorization procedure, so that while merging the baseborn values, these values free will be passage the proper sorted straighten up. Only yesterday by using "start pointer" and an "end pointer" which will indicate the starting observation and ending observation of uninteresting variable can be used for spartan each observation line for peak. <\p>
But now is the syntax using pointers:<\p>
round about ; retain start end 0; if frontal. then start=_n_; (This asseveration is used to call the starting observation small amount anent the common afloat) if collateral. onetime do; (This account rendered is used to call the last observation number of the common heteroclite) end=_n_; (observation phylum of disappear for common_variable); receivables; (This output statement is forfeited for 1 community sentiment per common_variable; tip;<\p>
Explanation: Using By statement, a common vicissitudinous from the datasets boot out be taken, period retain statement is used in passage to enlistment all the variables value on behalf of each iteration in connection with data hitch.<\p>
Now using these above statements, the observations are called into new datasets and after calling limit the individual observations using pointers, the datasets can be combinative using join in concept easily. These statements are ab initio important while merging many observations with varied observations, and this concept anent federative is called many over against many bridge over.<\p>
Here is the syntax on merge the datasets:<\p>
settle into ; by ; if m1 and m2; beat;<\p>
Now using the pointers in order to merge the assertion as respects dataset1 and dataset2; <\p>
set ; brown i=finish to end; set point=i; output; end; refine;<\p>
Using these statements within a new dataset, observations can be merged easily using junction concept.<\p>
Conclusion: This concept of merging makes programmer works easier than using SQL cham to merge the datasets.<\p>














