Help using Base SAS procedures

how to search a "not missing" string in data step?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 128
Accepted Solution

how to search a "not missing" string in data step?

Hello

I am looking for a command (not missing?) that I can do the following:

if string1 'NOTMISSING' then test_string=1;

I tried:

if string1 then test_string=1;

but it did not work correctly. Any suggestions?

Thanks.


Accepted Solutions
Solution
‎03-18-2013 03:56 PM
Respected Advisor
Posts: 3,124

Re: how to search a "not missing" string in data step?

You are very close:

if not missing(string1) then test_string=1;

or:

test_string=not missing(string1);

Haikuo

View solution in original post


All Replies
Solution
‎03-18-2013 03:56 PM
Respected Advisor
Posts: 3,124

Re: how to search a "not missing" string in data step?

You are very close:

if not missing(string1) then test_string=1;

or:

test_string=not missing(string1);

Haikuo

Frequent Contributor
Posts: 128

Re: how to search a "not missing" string in data step?

Thanks for the quick reply. your code works great.

it makes me recall how I looked for the "where notin (xxx)" statement. :smileylaugh:

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 148 views
  • 1 like
  • 2 in conversation