BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
robertrao
Quartz | Level 8

Hi,

int1 and ext1 are numeric

i am trying to set both of them to missing if int1 has a particular date-time

i am getting this syntax error in the log

What corrections do i need to make to get it right??

Thanks

31   data test2;
32   set test;
33   if mrn1 eq '101' and int1 eq 27DEC2011:15:02:00 then call missing(int1,ext1);
                                                      -------
                                                      388
                                                       76
ERROR 388-185: Expecting an arithmetic operator.

ERROR 76-322: Syntax error, statement will be ignored.

34   run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST2 may be incomplete.  When this step was stopped there were 0 observations and 24 variables.
WARNING: Data set WORK.TEST2 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      user cpu time       0.00 seconds
      system cpu time     0.00 seconds
      Memory                            267k
      OS Memory                         15984k
      Timestamp            5/21/2013  8:59:53 AM



1 ACCEPTED SOLUTION

Accepted Solutions
Haikuo
Onyx | Level 15

SAS needs to be told it is a date time value:

if mrn1 eq '101' and int1 eq "27DEC2011:15:02:00"dt then blah...

View solution in original post

2 REPLIES 2
Haikuo
Onyx | Level 15

SAS needs to be told it is a date time value:

if mrn1 eq '101' and int1 eq "27DEC2011:15:02:00"dt then blah...

robertrao
Quartz | Level 8

Thanks I got it this time..

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
  • 716 views
  • 0 likes
  • 2 in conversation