Log 26.3The SAS Log After Creating a Function to Use as a Format
323 proc fcmp outlib=library.functions.smd;
324 function ctof(c) $;
325 return(cats(((9*c)/5)+32,'F'));
326 endsub;
327
328 function ftoc(f) $;
329 return(cats((f-32)*5/9,'C'));
330 endsub;
331
332 run;
NOTE: Function ftoc saved to library.functions.smd.
NOTE: Function ctof saved to library.functions.smd.
NOTE: PROCEDURE FCMP used (Total process time):
real time 17.59 seconds
cpu time 1.26 seconds
333
334 options cmplib=(library.functions);
335
336 data _null_;
337 f=ctof(100);
338 put f=;
339 run;
f=212F
NOTE: DATA statement used (Total process time):
real time 0.50 seconds
cpu time 0.01 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.