Hi All,
I am using proc ds2 code in Procedural Window in SAS Event Stream Processing 3.2.
The goal is to transpose the streaming data.But as we execute the procedural window , which consists of the code for transpose, it just stops responding.
My Source Data consists of 720 records and post transpose it should consists of 120 records.
Please find the code below:
ds2_options cdump;
data esp.out;
drop DeviceName Readings DeviceId;
declare double RPM;
declare double OPRESS;
declare double OLEVEL;
declare double OTEMP;
declare double NOISE;
declare double WTEMP;
method run();
set esp.in;
by TimeInterval;
if DeviceName='rpm' then RPM=Readings;
else if DeviceName='opress' then OPRESS=Readings;
else if DeviceName='olevel' then OLEVEL=Readings;
else if DeviceName='otemp' then OTEMP=Readings;
else if DeviceName='noise' then NOISE=Readings;
else if DeviceName='wtemp' then WTEMP=Readings;
if first.TimeInterval then output;
end;
enddata;
Seeking Your help and guidance.
Thanks in advance.
I believe the BY statement is not supported in SAS Event Stream Processing 3.2. Give this a try:
ds2_options cdump;
data esp.out;
declare double RPM;
declare double OPRESS;
declare double OLEVEL;
declare double OTEMP;
declare double NOISE;
declare double WTEMP;
retain RPM OPRESS OLEVEL OTEMP NOISE WTEMP;
method run();
set esp.in;
if DeviceName='rpm' then RPM=Readings;
else if DeviceName='opress' then OPRESS=Readings;
else if DeviceName='olevel' then OLEVEL=Readings;
else if DeviceName='otemp' then OTEMP=Readings;
else if DeviceName='noise' then NOISE=Readings;
else if DeviceName='wtemp' then do;
WTEMP=Readings;
output;
end;
end;
enddata;
Regards,
Robert
I believe the BY statement is not supported in SAS Event Stream Processing 3.2. Give this a try:
ds2_options cdump;
data esp.out;
declare double RPM;
declare double OPRESS;
declare double OLEVEL;
declare double OTEMP;
declare double NOISE;
declare double WTEMP;
retain RPM OPRESS OLEVEL OTEMP NOISE WTEMP;
method run();
set esp.in;
if DeviceName='rpm' then RPM=Readings;
else if DeviceName='opress' then OPRESS=Readings;
else if DeviceName='olevel' then OLEVEL=Readings;
else if DeviceName='otemp' then OTEMP=Readings;
else if DeviceName='noise' then NOISE=Readings;
else if DeviceName='wtemp' then do;
WTEMP=Readings;
output;
end;
end;
enddata;
Regards,
Robert
Whether you're already using SAS Event Stream Processing or thinking about it, this is where you can connect with your peers, ask questions and find resources.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.