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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

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
  • 1 reply
  • 639 views
  • 0 likes
  • 2 in conversation