DATA Step, Macro, Functions and more

options missing=0 in DI studio

Reply
Occasional Contributor
Posts: 14

options missing=0 in DI studio

hi
I wrote following code in DI studio:

options missing=0;
data total;
merge mtd(in=m)
mtd_std(in=s)
mtd_rek(in=r);
by ATC_code;
if m=1;
run;

Option missing=0 doesn't seem to work. The missing values are still missing, not replaced by 0.
I tried it in Base SAS and Enterprise guide, it works well in both?
someone has an idea what´s wrong?

Thanks in advance
Respected Advisor
Posts: 3,777

Re: options missing=0 in DI studio

The MISSING option works when the value is displayed/printed. It does not change the value of any variables.

Look at PROC STDIZE to poke missing values with values of your choice.
Occasional Contributor
Posts: 14

Re: options missing=0 in DI studio

thanks a lot for the replies. To get it right, is that because DI studio will only display the value of variables? the Missing options will therefore not work in DI studio Message was edited by: psysas
Respected Advisor
Posts: 3,908

Re: options missing=0 in DI studio

Hi

As others already said:
Options missing='0'; is for PRINTED output like LISTING, PDF, HTML or the like.

This is something you rarely create with DIS. The values are not set to 0 in the tables - nor is this a format showing missings as '0'. As the output of your DIS jobs is normally a table, Options missing='something' has no effect.

Not sure what you've seen in EG. But the TABLES sure didn't show a '0' either.

HTH
Patrick
Occasional Contributor
Posts: 14

Re: options missing=0 in DI studio

Hi Patrick
EG shows 0 in the output table.
Thanks for your advice. will avoid option missing in DI in future
Valued Guide
Posts: 2,175

Re: options missing=0 in DI studio

option missing='0' ;
affects output
not stored values
Ask a Question
Discussion stats
  • 5 replies
  • 1236 views
  • 0 likes
  • 4 in conversation