I would like to save data that meets a certain condition to an Excel file. But if no data meets the condition, I'd like to skip the SAVE TRANSLATE command (otherwise, the Excel file is created but it's empty).
Code: Select all
SELECT IF (MyVar = 1).
* if no cases have MyVar = 1, then how to skip next command?
SAVE TRANSLATE OUTFILE=!Path1+'MyData.xlsx'
I tried using a DO IF instead of SELECT IF, but that gives "LOOP has no effect on this command' error.