... regarding my own process, CPU times are very close between If Then Else, IFC and IFN. Let's says we can still use several tools for such operations before knowing if there is a best and a worst. That's the bright (although sometimes exhausting...) side of SAS! Michel Original site validation data Site name: 'CHU DE MONTPELLIER SERVEUR DE PROD VIRTUEL PMSI'. Site number: 50100613. CPU A: Model name='' model Operating System: WX64_SV ... data testdata; 16 set sashelp.class; 17 do i=1 to 50000; 18 output; 19 end; 20 run; NOTE: There were 19 observations read from the data set SASHELP.CLASS. NOTE: The data set WORK.TESTDATA has 950000 observations and 6 variables. NOTE: Compressing data set WORK.TESTDATA decreased size by 17.06 percent. Compressed is 9380 pages; un-compressed would require 11310 pages. NOTE: DATA statement used (Total process time): real time 0.57 seconds cpu time 0.57 seconds 21 22 23 data test1a; 24 set testdata; 25 gender=ifc(sex eq 'M','Male','Female'); 26 run; NOTE: There were 950000 observations read from the data set WORK.TESTDATA. NOTE: The data set WORK.TEST1A has 950000 observations and 7 variables. NOTE: Compressing data set WORK.TEST1A decreased size by 81.23 percent. Compressed is 3639 pages; un-compressed would require 19388 pages. NOTE: DATA statement used (Total process time): real time 1.44 seconds cpu time 1.45 seconds 27 data test1b; 28 set testdata; 2 The SAS System 09:49 Friday, January 4, 2013 29 if sex eq 'M' then gender='Male'; 30 else gender='Female'; 31 run; NOTE: There were 950000 observations read from the data set WORK.TESTDATA. NOTE: The data set WORK.TEST1B has 950000 observations and 7 variables. NOTE: Compressing data set WORK.TEST1B decreased size by 8.64 percent. Compressed is 10333 pages; un-compressed would require 11310 pages. NOTE: DATA statement used (Total process time): real time 1.20 seconds cpu time 1.20 seconds 32 data test2a; 33 set testdata; 34 agegroup=ifn(age le 15,1,2); 35 run; NOTE: There were 950000 observations read from the data set WORK.TESTDATA. NOTE: The data set WORK.TEST2A has 950000 observations and 7 variables. NOTE: Compressing data set WORK.TEST2A decreased size by 21.78 percent. Compressed is 10321 pages; un-compressed would require 13195 pages. NOTE: DATA statement used (Total process time): real time 1.15 seconds cpu time 1.15 seconds 36 data test2b; 37 set testdata; 38 if age le 15 then agegroup=1; 39 else agegroup=2; 40 run; NOTE: There were 950000 observations read from the data set WORK.TESTDATA. NOTE: The data set WORK.TEST2B has 950000 observations and 7 variables. NOTE: Compressing data set WORK.TEST2B decreased size by 21.78 percent. Compressed is 10321 pages; un-compressed would require 13195 pages. NOTE: DATA statement used (Total process time): real time 1.17 seconds cpu time 1.17 seconds ...
... View more