BookmarkSubscribeRSS Feed
psysas
Calcite | Level 5
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
5 REPLIES 5
data_null__
Jade | Level 19
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.
psysas
Calcite | Level 5
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
Patrick
Opal | Level 21
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
psysas
Calcite | Level 5
Hi Patrick
EG shows 0 in the output table.
Thanks for your advice. will avoid option missing in DI in future
Peter_C
Rhodochrosite | Level 12
option missing='0' ;
affects output
not stored values

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2997 views
  • 0 likes
  • 4 in conversation