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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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