BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ValSki
Calcite | Level 5
In the case of missing semicolons and/or unbalanced quotes, SAS would alert me in the log window. There are no errors that appear when I run the code. I also have taken your advice Tom and brought the commands closer together so they are not far off on the right. However, no success. I continue to have the data step running in the active editor window.
Tom
Super User Tom
Super User

Best to start with a fresh SAS session in case it is some previous step that has confused it.

Try submitting a trivial step to make sure it is working.

data test1; run;

Then try to figure out what in your program is confusing SAS.  Try doing essentially a binary search.  Remove, or commentout with /*  */, half of program and see if it runs.  If it runs the problem is in the comment section if not it is in the part not commented. repeat until you find the line that is confusing SAs. Note you might need to restart SAS once it starts to fail to continue your testing.

ValSki
Calcite | Level 5
Just started a fresh SAS session and ran the test you recommended. SAS is working. Could you elaborate on the commentout method to see which part of my program is confusing SAS. That's where I lost you.
PaigeMiller
Diamond | Level 26

Another thought occurs to me

 

Sometimes, if you are joining two tables in SQL, or via the DATA step MERGE command, sometimes I do it wrong and instead of getting the desired answer, you get a data set with 1000 times too many observations. You might want to check that, because that could cause later steps to take huge long times. But there's no error in the LOG.

--
Paige Miller
ValSki
Calcite | Level 5
Good thought. However, I'm not merging any data. Just a simple import of one dataset. SAS is recognizing the dataset because i've run frequencies on the variables that make up that long syntax that was in the PDF. It's that particular syntax that is causing it grief. I still haven't figured out what part of it is stressing SAS out.
Tom
Super User Tom
Super User

The code you posted  in the PDF as a long data step with many statements. So something like

data want;
  set have;
  if x =1 then y=2;
  if z=3 then w=4;
  ....
  if a=4 then b=2;
run;

So to tell if the program is working comment out most of it and see if it works.  For example you comment out everything but the DATA, SET and RUN statements.

data want;
  set have;
/*
  if x =1 then y=2;
  if z=3 then w=4;
  ....
  if a=4 then b=2;
*/
run;

If that works then try just commenting out the top half.

data want;
  set have;
/*
  if x =1 then y=2;
  if z=3 then w=4;
*/
  ....
  if a=4 then b=2;
run;

If that works then the bottom statments are probably valid and the mistake is in the part that your removed or commented out.

So comment out the top quarter instead. Repeat until it is clear which statement is the problem.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 20 replies
  • 1566 views
  • 1 like
  • 3 in conversation