Help using Base SAS procedures

Initializing dataset to have zero observations

Reply
N/A
Posts: 0

Initializing dataset to have zero observations

Hi All,

I have a question which seems to be basic but I was not able to get to it in the documentation.

I wanted to know how to initialize a dataset to null(may be null is wrong vocabulary,basically I want the dataset to have zero observations) . Because, looks like I am having one extra empty row(observation) in my dataset before I do any processing on the dataset.

Thanks,
Neel
Super Contributor
Super Contributor
Posts: 3,174

Re: Initializing dataset to have zero observations

Posted in reply to deleted_user
A few techniques:

1) use the STOP; command in a DATA step (at least before an OUTPUT, if coded).
2) use OPTIONS OBS=0; -- this statement's positioning will depend on the overall SAS program execution objective (considering handling of input and output SAS and external files).

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Initializing dataset to have zero observations

Thanks Scott!

Using "stop;" seems to be working.

Neel
Ask a Question
Discussion stats
  • 2 replies
  • 116 views
  • 0 likes
  • 2 in conversation