BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I would like to add in a macro that the job ends if the value of a macro variable is equal to something and that it goes on if not.
What is the code for telling the job to end ?

Quel est le code pour interrompre un job dans une macro ?
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
In part, this depends on the design of your SAS macro program and how you are executing the macro program. It also depends on what you mean by a "job" -- do you mean a single step program, a multi-step program or do you mean that you want to interrupt or stop a DATA step program in mid-stream??? You could also be using SAS DI Studio and want to conditionally execute a stored process that has been turned into a DI Studio job.

Without more information, it is hard to make specific recommendations. However, some good examples can be found here and they should at least point you in the right direction:
http://www.nesug.org/Proceedings/nesug09/cc/cc23.pdf
http://www2.sas.com/proceedings/sugi26/p074-26.pdf
http://www2.sas.com/proceedings/sugi30/154-30.pdf
http://www2.sas.com/proceedings/sugi30/021-30.pdf

cynthia
ArtC
Rhodochrosite | Level 12
In SAS9 the %ABORT statement has similar capabilities to the DATA step's ABORT statement. It is executable so it can be used with an %IF.

Different combinations of %ABORT and its options perform differently depending on the OS and the operating environment. Experiment.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 668 views
  • 0 likes
  • 3 in conversation