Hello,
Is this Enterprise Miner?
Is it the File Import node that keeps running or the subsequent Code Node?
I think there's nothing wrong with your code (although the code as you have copy/pasted it is not having spaces where you need spaces; you need at least one space in front of &)
DATA &EM_EXPORT_TRAIN &EM_EXPORT_VALIDATE;
SET &EM_IMPORT_DATA;
IF Validation=1 then output &EM_EXPORT_VALIDATE;
else if Validation=0 then output &EM_EXPORT_TRAIN;
run;
Koen