Q)What is a method for assigning
first.VAR and last.VAR to the BY groupvariable on
unsorted data?
A) In unsorted data you can't use First. or Last.
Q)How does SAS handle missing
values in: assignment statements, functions, a merge, an update, sort order,
formats, PROCs?
A) Missing values will be assigned as missing in Assignment statement. Sort
order treats missing as second smallest followed by underscore.
Q)Difference between PROC SORT
NODUPKEY and NODUP option?
Remove duplicate records(all fields are same) with
same sort key
Remove other records(all fields may not be same) with same sort key
NODUPRECS
checks for and eliminates duplicate observations.If
you specify this option, then PROC SORT compares all variable values for each
observation to those for the previous observation that was written to the
output data set.If an exact match is found, then the
observation is not written to the output data set.
Nodup/Noduprecs
Duplicate records are not adjacent |
|
data one; R 3 9 |
Obs X Y Z 3 R
3
9 |
Nodup/Noduprecs
Duplicate records are adjacent |
Duplicate records are not adjacent but dataset
is sorted on all variables |
Output |
data one; R 3 9 |
data one; R 3 9 |
Obs X Y Z |
Nodupkey
Duplicate records are adjacent |
Duplicate records are not adjacent |
Output |
data one; R 3 9 |
data one; R 3 9 |
Obs X Y Z |
Thank you for sharing Valuable information .
ReplyDeletewhy dont you post some more, if possible....