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
SAS Super FREQ
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 .

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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