Hello everyone,
I would like to create a dataset of two columns with random integers as a table in my workspace but also as a view. Thus I use the following snippet of code :
data A / view=work.A_view ;
call streaminit(123);
do id = 1 to 1000000;
age_A = int(100*rand("Uniform"));
output;
end;
run;
But it returns as error : ERROR: The requested type of view (Input or Output) cannot be determined.
Would you know what does it mean in my case please ? How to fix it please ?
Thank you in advance for your help.
Best regards,
Use dataset name as viewname
2755
2756 data A / view=a ;
2757 call streaminit(123);
2758 do id = 1 to 1000000;
2759 age_A = int(100*rand("Uniform"));
2760 output;
2761 end;
2762 run;
NOTE: DATA STEP view saved on file WORK.A.
NOTE: A stored DATA STEP view cannot run under a different operating system.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
Use dataset name as viewname
2755
2756 data A / view=a ;
2757 call streaminit(123);
2758 do id = 1 to 1000000;
2759 age_A = int(100*rand("Uniform"));
2760 output;
2761 end;
2762 run;
NOTE: DATA STEP view saved on file WORK.A.
NOTE: A stored DATA STEP view cannot run under a different operating system.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
A dataset/view cannot have two different names. Make sure both names in the DATA statement match.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.