BookmarkSubscribeRSS Feed
pri26
Calcite | Level 5

Hi, 

I have this code and I wanted to know the steps to get to the output?

 

ThanksScreen Shot 2020-02-17 at 4.26.52 PM.png

4 REPLIES 4
Reeza
Super User

The code shown generates the output shown. Does it not run for you? I didn't type it out (can't copy and paste from an image) so it seems fine at first glance. 

 

Is there something else you're looking for beyond this?

 


@pri26 wrote:

Hi, 

I have this code and I wanted to know the steps to get to the output?

 

ThanksScreen Shot 2020-02-17 at 4.26.52 PM.png


 

pri26
Calcite | Level 5

I wanted someone to explain why the output is that with the Retain and sum, why does it repeat the x values twice?

Reeza
Super User
Go through each line of the code and add your comments to what you think it's doing. Post that back and we'll show you where your understanding may be incorrect.
andreas_lds
Jade | Level 19
Because you have two output statements in your data step.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 503 views
  • 0 likes
  • 3 in conversation