DATA Step, Macro, Functions and more


Frequent Contributor
Posts: 114


Dear SAS community,


I would like to run N lines from my SAS program. Based on some research, I think the subtop command is the best way to go.  However, I can't seem to figure out how to utilize this command.  Would someone direct me to some useful resources?


On a similar note, anyone know why you can only run <1000 lines using the Run --> Submit N Lines command from the menu bar?


Thanks again!

Super User
Posts: 13,507

Re: subtop

[ Edited ]
Posted in reply to sophia_SAS

Are you always running the same number of lines? If so easiest might be a KEYS entry. In BASE SAS F9 in the edior by default should bring up a KEYS menu. If there hasn't been any customization you will see for Key SHF F1 (shift F1) subtop. You can add a number after that to indicate the that you want to run the top n lines. But it always submits the top and that fixed number of lines.


It might be worthwhild to investigate breaking your code into sections and possibly using %include files to run just bits of it.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation