BookmarkSubscribeRSS Feed
MJyothi
Calcite | Level 5
Hi All,

This may be a tricky question, however i hope there will be a solution for the same.

I have created one automated macro with error traping, like if there is an error in macro in any of the steps macro will through an error and stops execution. Now i want to execute my macro from the error only after modification.

For example i got the error in 3rd step of macro, i will change it and execute it again, then the macro should execute from 3rd step only not from step1 which reduces the execution time.

In long process executions it will help us a lot.

Any thoughts ?
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You will need to setup some external detection, either with a SAS file or an external file that gets written to as you progress through the macro execution. You would then need to add appropriate SAS code to detect any prior progress and as needed suppress some SAS MACRO code logic execution. The topic would be "restartability".

Scott Barry
SBBWorks, Inc.
PatrickG
SAS Employee
Do you typically see errors every time you run your program or are you just trying to debug it?
ArtC
Rhodochrosite | Level 12
Take a look at the %ABORT statement. Depending on the level of termination that you want to achieve, it may be helpful. It also allows you to 'pass back' a return code which you may be able to use to determine your restart point.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 944 views
  • 0 likes
  • 4 in conversation