BookmarkSubscribeRSS Feed
imanojkumar1
Quartz | Level 8

Hi KSharp,
Thanks once again.
I got the following error:

series x=x y=y /smoothconnect break;
_____________
22
202
ERROR 22-322: Syntax error, expecting one of the following: ;, ATTRID, BREAK, CLUSTERWIDTH, CURVELABEL, CURVELABELATTRS,
CURVELABELLOC, CURVELABELPOS, DATALABEL, DATALABELATTRS, DISCRETEOFFSET, GROUP, GROUPDISPLAY, GROUPORDER,
LEGENDLABEL, LINEATTRS, MARKERATTRS, MARKERS, NAME, NOMISSINGGROUP, TRANSPARENCY, URL, X2AXIS, Y2AXIS.
ERROR 202-322: The option or parameter is not recognized and will be ignored.

 

 

 

ALSO I wonder if I could do something like (for selecting first date and first TS for subsetting):

 

data x(where=(date=first.datetimestamp and TS=first.TS));
infile '/folders/myfolders/code12.txt' truncover;
  input DateTimeStamp : anydtdtm32. ASN $CWC $ TS $ Mno X Y;
  format DateTimeStamp datetime. date date9.;
  date=datepart(datetimestamp);
  dif_y=dif(y);
  dif_x=dif(x);
run;
Ksharp
Super User
Your code is not right.

The ERROR info say SMOOTHCONNECT is not support by your SAS. 
Remove it ,should work.

imanojkumar1
Quartz | Level 8
I realised lately, I am using an older version of SAS. any other alternative, if it is important. otherwise I just removed it and it is working.
imanojkumar1
Quartz | Level 8

I think I tried a little differently then what you did for calculation of x_dif and y_dif:

 

data want (drop=LagX LagY); 
 set mydata; 
    LagX=lag(X);
    LagY=lag(Y);
	dif_y=dif(y);
        dif_x=dif(x);
	Date=datepart(DateTimeStamp); format Date date9.;
  if    MNo=1 then Lag_X=0; else Lag_X=LagX;
  if    MNo=1 then Lag_Y=0; else Lag_Y=LagY;
  if    MNo=1 then xDiff=0; else xDiff = X - Lag_X;
  if    MNo=1 then yDiff=0; else yDiff = Y - Lag_Y;
run;

here the way I did takes care of situation wherever there is MNo. =1, which means start of a new set of observation (an obviously ASN will get changed as well), so row at MNo=1 will have xDiff=0, yDiff=0, Y_Lag=0, X_Lag=0 (as this is first row of the dateset9 and rest all (X and Y) will be calculated based on lag value. This will not result error in computation like we are getting with X_dif and Y_dif.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 18 replies
  • 3992 views
  • 5 likes
  • 3 in conversation