I need to find the numeric field which contains blank in
between..Ex:123 456...there is blank in between the 123
456..I need to know if there is any SAS function to find a
field..


Please suggest...

Answers were Sorted based on User's Feedback



I need to find the numeric field which contains blank in between..Ex:123 456...there is blank in b..

Answer / kalyan

we can use index function to find any specific string.

test=index('123 456',' ') it will give 4, the position of blank. is this helpful?

Is This Answer Correct ?    8 Yes 0 No

I need to find the numeric field which contains blank in between..Ex:123 456...there is blank in b..

Answer / mahesh babu

data test;
a="123 456";
b=anyspace(a);
run;

Is This Answer Correct ?    2 Yes 0 No

I need to find the numeric field which contains blank in between..Ex:123 456...there is blank in b..

Answer / amaranuswathi

Please suggest if any function is there to find to find the
particular field...

Is This Answer Correct ?    0 Yes 0 No

I need to find the numeric field which contains blank in between..Ex:123 456...there is blank in b..

Answer / akhil

If I am having a data set c
data test;
input c $ 20.;

cards;
123 456
217 236
456235
225 5665
55
77 85
46556
4588 56
;
run;
proc print;
run;

Now I am going to fetch observation having space in between,

data e(drop=e t);
set test;
e=length(c);
t=find(c,'');
if e>t;
run;
proc print data=e;
run;

Is This Answer Correct ?    0 Yes 0 No

I need to find the numeric field which contains blank in between..Ex:123 456...there is blank in b..

Answer / akhil126

data test;
input c $ 20.;

cards;
123 456
217 236
456235
225 5665
55
77 85
46556
4588 56
;
run;
proc print;
run;

data e(drop=e t);
set test;
e=length(c);
t=find(c,'');
if e>t;
run;
proc print data=e;
run;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

how to intersect the tables by using PROC MIXED?

1 Answers   CitiGroup,


Explain the use of proc print and proc contents?

0 Answers  


How would you include common or reuse code to be processed along with your statements?

5 Answers   PSCI,


What is a macro routine?

0 Answers  


How would you delete observations with duplicate keys?

13 Answers   Accenture,






1.we can execute a macro with in a macro,by using call symput and symget can any one give me one example? 2.We can create the macro variables by using %let,%do,macro parameters,INTO clause in proc sql and call symput, can any one give me example to create macro variable with INTO clause and call symput? 3.

1 Answers  


which stats created by proc means that are not created by proc summary or vice versa?

2 Answers   GSK,


how will you locate the sas platform applications? : Sas-bi

0 Answers  


If a variable contains letters or special characters, can it be numeric data type?

0 Answers  


what is the function of catx syntax? : Sas-administrator

0 Answers  


What are the differences between proc means and proc summary?

0 Answers  


how do you pull data from equifax?tell me the process?

0 Answers   Synchrony Financial,


Categories