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-2024.png

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

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