And here is a way to change your code to date literals. Simply paste all your if statements between Datalines4 and ;;;; and run - then copy the new if condition from the log and paste them into your original code. This only has to be done once. Warning - untested code! So make sure you have a backup copy of your original code. Data _NULL_ ; Infile Datalines ; Input ; Length Date_Lit $ 12 ; p1 = find("=", _Infile_, 20) ; /* Second = */ p2 = find(";", _Infile_) ; /* First ; */ Part_A = Substr(_Infile_, 1, p1) ; Part_C = Substr(_Infile_, p2, 20) ; Date_MMDDYY = Substr(_Infile_, p1+1, p2-p1-1) ; Date_Date9 = Put(Input(Date_MMDDYY, MMDDYY10.), Date9.) ; Part_B = catt("'", Date_Date9, "'D") ; Result = catt(Part_A, Part_B, Part_C) ; Put Result ; Datalines4 ; if var_a=1 then date01=01/1/2012; else date01= .; if var_b=1 then date02=03/15/2013; else date02=.; ... ;;;; Hope this works Richard
... View more