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

what is SAS/Graph?

1 Answers   CitiGroup, NTPC,


Hi Jeevan/Akshara I have tried to contact SASI Vats for latest Advanced SAS Programming Certification Dumps (A00-212) but have not got any response. I would highly and gratefully appreciate your assistance in this regard. If you guys have access to this, would you be kind enough to forward it to me ? I would abide by all the terms you have for this. Please, note my email id: upretigopi@yahoo.com Preti Sharma

0 Answers  


Hi... this is chandu, did MSc Microbiology, trying to get job in SAS tool, PLZ Tell me whether IT industries will give consider my education to gain a job....?

2 Answers  


Briefly explain input and put function?

0 Answers  


How to Rename Library?

3 Answers  


how to rearrange the data as our wish by using dataset block?

4 Answers   Cognizant,


what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming

0 Answers  


what are the scrubbing procedures in sas? : Sas programming

0 Answers  


Explain by-group processing?

0 Answers  


Do you use PROC REPORT or PROC TABULATE? Which do you prefer? Explain.

3 Answers  


When looking for data contained in a character string of 150 bytes, which function is the best to locate that data: scan, index, or indexc?

2 Answers   Accenture,


what is proc Index? and what is proc document?

0 Answers   Mind Tree,


Categories