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 is SAS/Graph?

1 Answers   CitiGroup, NTPC,


How do handle working under pressure?

1 Answers   Oracle, Wipro,


What is the use of PROC gplot?

0 Answers  


how do you validate tables abd reports?

2 Answers   Accenture, Quintiles,


What is the difference between nodup and nodupkey options?

20 Answers   iFlex, Makro, Talwar,






i am importing large data from oracle to work library. in log there is a error message worklibrary space is not enough. then how to import the data safely to sas environment.

2 Answers   Cap Gemini,


data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.

0 Answers  


hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

0 Answers   Pfizer,


Do you think professionally?

1 Answers   Oracle,


What are MIs reports? what is the use of MIS reports and How can u generate the MIS reports in SAS? If any body know explain with the eg.

2 Answers   ABC, ASD Lab, CitiGroup,


What are the default statistics that proc means produce?

0 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  


Categories