How to stop the execution in SAS program without closing the application

Posted on 2009-12-18
Last Modified: 2013-11-16

I have a SAS-program where i do a test if a certain file exists.
How to stop the execution of the SAS program when the file does not exist i want only to stop execution without closing the application.

Question by:sonmic
    LVL 14

    Expert Comment

    by:Aloysius Low
    writing a condition to only execute if the file is found?

    i'm not sure what you are asking exactly - the SAS program will end one way or another without you having to close the application. can you please be more specific?

    Author Comment

    I have for example 100 data/proc steps. In the first data step i read about 25,000,000 records. When the output is 0 records, then I want stop the processing without closing the application.
    LVL 14

    Accepted Solution

    i would suggest writing macros in that case and have a flag to keep track of the execution process.

    after each data / proc step, check the output data set observations and update the flag accordingly. next, have an if condition which will check the flag indicates if the processing should proceed.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Introduction After workin in a plethora of programming languages like C, Pro*C, ESQL/C, C++, VC++, VB, Java, HTML,JavaScipt etc, technologies and frameworks like JSP, Servlets, Struts, Spring, IBatis etc and databases like MS Access, SQLServer, Inf…
    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now