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

how to add distinctly var variable values ex.. Data a; input var; datalines; 0 1 2 3 -1 -2 -3 ; run; adding all +ve value in one varibale n do the same for -ve too

5 Answers   CTS,


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  


where will go the observations that were deleted by delete statement?

2 Answers  


what is data integration? : Sas-di

0 Answers  


How does the internal authentication work in sas? : sas-grid-administration

0 Answers  






In the flow of DATA step processing, what is the first action in a typical DATA Step?

6 Answers   Accenture,


what is the prob plot in clinical domain

1 Answers   TCS,


How to save the log information in a file for future use

2 Answers   HCL,


What is the difference between match merge and one to one merge?

0 Answers  


Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro

0 Answers  


Why is SAS considered self-documenting?

1 Answers   Quintiles,


What is Tabulate.?Why we use it.? Which type of output we get from Tabulate.?

3 Answers   TCS,


Categories