what do the mod and int function do? What do the pad and dim functions do? : Sas programming



what do the mod and int function do? What do the pad and dim functions do? : Sas programming..

Answer / Priya Agarwal

1. MOD: Returns the remainder of a division operation.nn data numbers;n input x y;n length result 8;n result = mod(x,y);n run;
2. INT: Rounds a numeric value down to the nearest integer.nn data numbers;n input x y;n length result 8;n result = int(x/y);n run;
3. PAD: Adds spaces to the left of a character string so that it reaches a specified length.nn data strings;n input s len;n length padded 16;n padded = padl(s,len);n run;
4. DIM: Returns the dimension of an array or matrix.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

1 Answers   Quintiles,


What do the SAS log messages "numeric values have been converted to character" mean?

1 Answers   Quintiles,


What is LAG function?How is it used? can any one explain

3 Answers   TRE, Verinon Technology Solutions,


what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?

1 Answers  


Hi Friends, My name is Priya,am new to this Forum. am looking for SAS Platform Administration Interview Questions.I searched every where but I couldn't find any where.please can anyone help me with the FAQ's. It would be a great favor to me if you can email the Interview Questions to priyafeb84@gmail.com

0 Answers  


What are the different types of sas functions?

1 Answers  


data study; input Subj : $3. Group : $1. Dose : $4. Weight : $8. Subgroup; x= input(Weight,5.1); datalines; 001 A Low 220 2 002 A High 90 1 003 B Low 193.6 1 004 B High 165 2 005 A Low 123.4 1 ; Why does X get truncated? X shows up as 22 instead of 220,9 instead of 90 and 19.8 instead of 198? This problem doesnt happen with the values 193.6 and 123.4. This does not happen if x is read on the 5. informat instead of the 5.1 informat

2 Answers  


what are the different ways of merging two datasets.name atleast 4.

2 Answers  


What does proc print, and proc contents are used for?

1 Answers  


Mention some common errors that are usually committed in sas programming.

1 Answers  


Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?

1 Answers  


How would you invoke a macro? : sas-macro

1 Answers  


Categories