SAS functions - SAS

Describe any three SAS functions

- LENGTH: The length of an argument is returned without counting the trailing blanks.
animal=’my cat’;
Result is - 6

- SUBSTR: The SUBSTR function extracts a substring from a given argument starting at a given ‘position’ for ‘n’ characters or until the end if ‘n’ is not specified
data dsn;
value =’(916)734-6241’;
Result is - 916

- TRIM: It removes the trailing blanks from a given character expression
Str1 = ‘my’;
Str2 = ‘cat’;
Result = TRIM(Str1)(Str2);
Result = ‘mycat’
SELECT construct is used instead of IF statements - SAS
When there is a long series of mutually existing conditions......
How to code a merge? - SAS
Step 1: Define three datasets in DATA step, Assign values of IN statement to different variables for two datasets.......
What is Program Data Vector (PDV)? What are its functions? - SAS
What is Program Data Vector (PDV)? - PDV is a logical area in the memory, SAS creates a dataset one observation at a time.......
Post your comment