DATA Step, Macro, Functions and more

Missing values.

Accepted Solution Solved
Reply
Contributor
Posts: 39
Accepted Solution

Missing values.

Hello all,

 

I am having issue with missing values in the report. The report looks like below.

 


                                                ADJUSTED
                                     CASH        ENDING          ENDING
 SERVICER                                       BALANCE          BALANCE
  NUMBER        DIFFERENCE        END BAL            (=)              (+)

 XXXXXX              -0.00      271402.27     -271402.27       1420485.32
 XXXXXX               0.00           0.00           0.00         19509.07
 XXXXXX               0.00            .             0.00          3402.88
 XXXXXX               0.00            .             0.00             0.00
 XXXXXX               0.00            .             0.00          1941.35
 XXXXXX               0.00            .             0.00          4115.95
 XXXXXX               0.00           0.00           0.00           816.53
 --------  ---------------  -------------  -------------  ---------------  ---
 ACTCODE             -0.00      271402.27     -271402.27       1450271.10


      INTEREST   REO INTEREST REINST       FRCLS INT    3RD PRTY     P&I
     COLLECTED   ADVANCED      INTEREST    ADVANCED        SALE      FROM LL
           (-)      (+)          (-)         (+)            (-)          (+)

     593450.96         .             .          .           .            .
       9227.82         .             .          .           .            .
       1885.66         .             .          .           .            .
          0.00         .             .          .           .            .
        733.07         .             .          .           .            .
       2496.49         .             .          .           .            .
        481.25         .             .          .           .            .
 ------------- ------------ ------------- --------- ----------- ------------ -
     608275.25        0.00          0.00       0.00        0.00         0.00

 

I want to replace the missing value '.' with 0.00, the input datasets has missing values, they are calculated in the program and shown on the report. Is there a way to efficiently do in SAS. I really appreciate your help.

 

Thanks in advance.

 

Neal. 

 

 


Accepted Solutions
Solution
‎01-04-2018 04:44 PM
Super User
Posts: 23,247

Re: Missing values.

Posted in reply to saslovethemost

You can try 

 

option missing='0';

But you should show your code, then we can make a recommendation. I'm assuming you're using PROC REPORT? Or a Data Step?

 

Other options depend on your current data structure, and obviously the easiest fix is to make the values 0 ahead of time and not change the reporting code.

View solution in original post


All Replies
Solution
‎01-04-2018 04:44 PM
Super User
Posts: 23,247

Re: Missing values.

Posted in reply to saslovethemost

You can try 

 

option missing='0';

But you should show your code, then we can make a recommendation. I'm assuming you're using PROC REPORT? Or a Data Step?

 

Other options depend on your current data structure, and obviously the easiest fix is to make the values 0 ahead of time and not change the reporting code.

Super User
Posts: 13,297

Re: Missing values.

Posted in reply to saslovethemost

Another option is to use create a format that displays missing as 0.00 and other values as desired but we'd need to see more examples to suggest a specific solution. One example could be:

proc format library=work;
value mymiss 
. = '0.00'
other =[F11.2]
;
run;

And use the MYMISS. format for your report items.

 

The missing option will only display a single character.

☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 152 views
  • 0 likes
  • 3 in conversation