here is a string like chq.2312244%4452-
from that i want only special characters in a column.
dont use compress. bcoz i have 1.2 billion of records.i want
another process to find the values instant from the data.

Answers were Sorted based on User's Feedback



here is a string like chq.2312244%4452- from that i want only special characters in a column. do..

Answer / krish

data spdot;
set spec_char;
if count(name,'.') ge 1 then dot=".";
if count(name,'%') ge 1 then per="%";
if count(name,"-") ge 1 then iph= "-";
col=(dot || per ||iph);
run;proc print;run;

Is This Answer Correct ?    6 Yes 2 No

here is a string like chq.2312244%4452- from that i want only special characters in a column. do..

Answer / krish

data spdot;
set spec_char;
if count(name,'.') then dot=".";
if count(name,'%') then per="%";
if count(name,"-") then iph= "-";
col=(dot || per ||iph);
run;proc print;run;

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More SAS Interview Questions

What do you feel about hardcoding?

3 Answers   Pfizer,


Why do we use QUIT commmand for proc datasets and proc sql ???

3 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.

0 Answers  


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

0 Answers  


what are informats in sas? : Sas-administrator

0 Answers  






Approximately what date is represented by SAS date value of 730

9 Answers  


What is the difference between verification and validation?

9 Answers   Oracle,


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

0 Answers  


I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a different functionality. In my program I use bot these data sets. How do I specify which Age variable I want to use?

6 Answers  


Please write codes to merge two datasets and keep every record in the first dataset.

1 Answers  


How would you code the criteria to restrict the output to be produced?

6 Answers   Accenture,


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  


Categories