Search code examples
sasenterprise-guide

Can you run SAS without actualy computing the table results


I am working with a gigantic database and SAS wont let me alter the queries without first running the entire SAS file and calculating everything which takes eternities.

Is there a way of running SAS in a way I can alter the queries and run them without really computing them. In a way what I mean is if there is a way that a query can create a dummy empty table so I can alter further queries, so that I only have to run the project at the end of my changes.


Solution

  • 1)You can try to use this code:

    data want;
       if 0 then set have;
       stop;
    run;
    

    It creates table that has structure of have table but without data. So, you can use this table for queries.

    2) Or if you want to use couple rows of data in your queries, use obs:

    data want;
       set have(obs=5);
    run; 
    

    This solution you can implement in query builder in SAS EG.

    • right button mouse click on source table in query builder

    query builder

    • properties
    • in table options type obs=5

    properties window