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."

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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