Help using Base SAS procedures

Reg:Minus

Reply
Contributor
Posts: 66

Reg:Minus

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
Super Contributor
Super Contributor
Posts: 3,174

Re: Reg:Minus

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
Ask a Question
Discussion stats
  • 1 reply
  • 121 views
  • 0 likes
  • 2 in conversation