BookmarkSubscribeRSS Feed
help09
Fluorite | Level 6
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
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
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
help09
Fluorite | Level 6
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 .

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1368 views
  • 0 likes
  • 2 in conversation