@dgoel wrote:
I have this currently:
%Macro checksourcetable;
%IsReadyToRun (%str(&PROGRAMNAME.), %sysfunc(dequote(&TD_ASOFDT.)));
%if &rl_result_value. eq %str(N) %then
%do;
%queueprocess(&rl_process_id.,0.5);
%RecordLog(%str(Requeue the process as the input tables have not completely loaded));
%ProcessFooter;
%abort cancel;
%end;
%else
%do;
%put 'Source tables available';
%RecordLog(%str(All source tables are available.));
%end;
%Mend checksourcetable;
Currently at %abort cancel, it ends abruptly, instead I want it to go out of the macro to the end of the program and end.
How can i change this?
If you want to skip to the end of the macro Checksourcetable try this:
%Macro checksourcetable;
%IsReadyToRun (%str(&PROGRAMNAME.), %sysfunc(dequote(&TD_ASOFDT.)));
%if &rl_result_value. eq %str(N) %then
%do;
%queueprocess(&rl_process_id.,0.5);
%RecordLog(%str(Requeue the process as the input tables have not completely loaded));
%ProcessFooter;
%goto eom;
%end;
%else
%do;
%put 'Source tables available';
%RecordLog(%str(All source tables are available.));
%end;
%eom: %Mend checksourcetable;
Nothing magic about eom above it is just a label. I used that for "end of macro".
Please post code into a code box opened on the forum using the {I} icon to preserve formatting. The message windows will reformat text quite a bit sometimes removing white space or inserting line breaks when copy and pasting to the editor.