2

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.

Llex
  • 1,770
  • 1
  • 12
  • 27

1 Answers1

1

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

Llex
  • 1,770
  • 1
  • 12
  • 27
  • I am still quite new to SAS so ive been using the UI and not writing the code by hand, is there a way of doing what youve said on the query builder UI. Just got deadlines and using the UI will lead to less errors – Pedro Lopes Jan 28 '20 at 11:47
  • @PedroLopes what software do you use? is it sas enterprise guide? – Llex Jan 28 '20 at 11:53
  • 1
    Thank you a lot that makes my job so much faster – Pedro Lopes Jan 28 '20 at 12:31