What is substr function?



What is substr function?..

Answer / Sarvesh Kumar Sharma

"substr()" is a SAS function that returns a specified number of characters from a given character variable or constant, starting at a specified position. For example: substr(my_char_var, 3, 5) will return the characters at positions 3 through 7 of my_char_var.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

what are the sites did u refer for enquiries and doubts for SAS

2 Answers   UBS,


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  


Where do you use proc means over proc freq?

1 Answers  


Does SAS ?Translate? (compile) or does it ?Interpret?? Explain.

10 Answers  


explain the difference between proc means and proc summary?

1 Answers  


how to remove duplicates using proc sql?

1 Answers  


Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.

1 Answers  


you have a data set like this. data qqq; input name $ total; cards; qq 22 ww 33 qq 22 ee 44 rr 33 ww 44 ; run; and you want output like this......... name total qq 22 ww 44 Do it by data set step.

6 Answers  


Describe the function and utility of the most difficult SAS macro that you have written?

1 Answers   Oracle,


how will you location sas platform applications available from web browser? : Sas-bi

1 Answers  


What is the role of unrestrictive users? : sas-grid-administration

1 Answers  


what is the use of sas management console? : Sas-di

1 Answers  


Categories