I have started using DS2 programming and have hit a snag. I have tried to convert a data step into DS2, however I am not 100 % sure that the procedure is handling the _error_ :
proc ds2;
data spdework.dsn1 (overwrite=yes) spdework.dsn2 (overwrite=yes);
dcl char brand country ;
dcl double _error_ ;
method init();
end;
method run();
SET spdework.aami_rif_1 (rename=( nvar_pre=nvar));
IF gdp>0 and content>0 then
country='US';
else if gdp>0 then
country='UK';
else if content>0 then
country='EU';
else
PUT 'errors';
if nvar>0 then
nvar=1;
brand='Brand X ';
set {select distinct customer from spdework.dsn3};
if _error_ then
output spdework.dsn1;
else
output spdework.dsn2;
end;
method term();
end;
enddata;
run; quit;
In data step I was getting 606490 in DS2 112810 obs. Any help would be appreciated.
Thanks
Hi
The _ERROR_ is an automatic variable within the DATA Step. You do not have the same variable available in DS2.
From the doc:
Automatic Variables
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.