Say ahead, I do realized the following: sas will still go throught if/do/end block regradless of the ‘if 0 then’ condition, to create variable c and d. the 'correct' way could be using %if/%do/%end instead, to avoid any NOTEs in log. but i am not looking for answers like that. data test; a = '32JAN2024'; b = 1; c = input(a,date9.); d = input(b,date9.); run; The above code will produce two NOTEs in the sas log, one is 'Numeric been convted to Character' and the other one is 'Invalid argument to INPUT'. If i enclose the definition of c and d in a if/do/end block like below, the 'Numeric been convted to Character' NOTE is still in the log, but the 'Invalid argument to INPUT' NOTE was not in log anymore. data test; a = '32JAN2024'; b = 1; if 0 then do; c = input(a,date9.); d = input(b,date9.); end; run; I am curious about how SAS process a if/do/end block in data step. It is different than code outside of if/do/end block, right?
... View more