Help using Base SAS procedures

scan data if particular observation not found abort

Reply
Occasional Contributor krc
Occasional Contributor
Posts: 17

scan data if particular observation not found abort

Hi All

I have a dataset which has below information if "xyz" is not there in that dataset it should abort the process and should not go further

abc
abc
abc
abc
abc
dfg
dfg
dfg
dfg
dfg
dfg
xyz
xyz
xyz
xyz
cbf
cbf
cbf
cbf
cbf
cbf

Thanks
cbf
SAS Super FREQ
Posts: 8,739

Re: scan data if particular observation not found abort

Hi:
What is your "process" that needs to be aborted?? Reading the data? Displaying the data? Running a regression? Producing counts of the various codes? What program or procedure code composes your process? Is this variable the ONLY variable in the data set?

A bit more information from you is needed in order to provide meaningful suggestions.

In order to post data and/or program code to the forums, refer to this forum posting that describes how to post code and maintain code indenting levels.
http://support.sas.com/forums/thread.jspa?messageID=27609毙

cynthia
Occasional Contributor krc
Occasional Contributor
Posts: 17

Re: scan data if particular observation not found abort

Thanks For your reply

My Question is

- when a dataset contains above records i need to write a datastep in such a way that if 'xyz' is not there in that dataset then it should throw an error saying that 'xyz is not found' abort return .
Ask a Question
Discussion stats
  • 2 replies
  • 259 views
  • 0 likes
  • 2 in conversation