I need to use the "Replace" method when I'm going to read the first file, and the "Append to Existing" method in the others. I had the idea to use "Append to Existing" and delete the table when I detected the reading of the first file. the code worked, however it had a problem with the table. %macro APAGA;
/*proc sql;
DELETE FROM RECEITA.ESTABELECIMENTOS;
run;*/
data RECEITA.ESTABELECIMENTOS;
set RECEITA.ESTABELECIMENTOS (obs=0);
run;
quit;
data _null_;
IF instr(&Arq,"Y0.")>0 then call execute('%APAGA');
run;
quit; I managed to solve it in another way, now I have two Jobs, one with the Append option and the other with Replace, I choose between one and the other in a third job. My solution:
... View more