PUT_statement help

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

PUT_statement help

I am using the following PUT statement. The missing value in columns RAIN, TAMX, TMIN and SRAD is -99.0. However, I need it to be -99. Any solution?

PUT LDATE Z5. RAIN 6.1 TMAX 6.1 TMIN 6.1 SRAD 6.1


Accepted Solutions
Solution
‎10-10-2014 11:42 AM
Respected Advisor
Posts: 3,777

Re: PUT_statement help

Something like this might do.

proc format;
 
value m99m(default=6) -99='   -99' other=[f6.1];
  run;
data _null_;
  
input x;
   put x m99m.;
  
cards;
9
-9
-99
89.88
;;;;
   run;

View solution in original post


All Replies
Solution
‎10-10-2014 11:42 AM
Respected Advisor
Posts: 3,777

Re: PUT_statement help

Something like this might do.

proc format;
 
value m99m(default=6) -99='   -99' other=[f6.1];
  run;
data _null_;
  
input x;
   put x m99m.;
  
cards;
9
-9
-99
89.88
;;;;
   run;
New Contributor
Posts: 2

Re: PUT_statement help

Cheers. Works like a charm.

☑ This topic is SOLVED.

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

Discussion stats
  • 2 replies
  • 167 views
  • 0 likes
  • 2 in conversation