BookmarkSubscribeRSS Feed
sas_
Fluorite | Level 6
Hi

In a variable i am having 3 obs down,open,enter

Data l;
input name age;
down 45
open 67
enter 89
open 67
down 45
enter 90
open 56
run;

if down and continuing with open then down-open
like that if enter continuing with open the enter-open like that i want
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Not sure about how the SUBJECT correlates to the post/message body.

In a DATA step, if you need to "retain" an observation's value across DATA step passes, look at using a RETAIN statement to capture (with a SAS assignment statement), a temporary SAS variable, as required by your program.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:

programming intro data step retain site:sas.com

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!

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 774 views
  • 0 likes
  • 2 in conversation