BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Trazill
Calcite | Level 5

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,

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

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

View solution in original post

3 REPLIES 3
novinosrin
Tourmaline | Level 20

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
Tom
Super User Tom
Super User

A dataset/view cannot have two different names. Make sure both names in the DATA statement match.

PeterClemmensen
Tourmaline | Level 20

As the Data Step Doc states:

 

"view-name must match one of the output data set names."

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 3 replies
  • 1707 views
  • 3 likes
  • 4 in conversation