Hi
I would like to know all the possible ways to refer a varaible created in one data step to in an another datastep.
Thanks
Neal.
Look up the data step commands MERGE and UPDATE.
Also, this is possible in PROC SQL.
Sorry was not specific enough I think. How to use the value that is been created in one data step in another datastep.
@saslovethemost wrote:
Sorry was not specific enough I think. How to use the value that is been created in one data step in another datastep.
I already answered this.
I said:
Look up the data step commands MERGE and UPDATE.
Also, this is possible in PROC SQL.
There are two kinds of variables in SAS : dataset variables and macro variables.
I can think of at least 10 topics that would be more important to learn about in a DATA step:
_n_
variable lists
arrays
DO loops
first. and last.
MERGE
multiple SET statements
RETAIN
sum statement
setting lengths of character variables
To address your question, refer to the variable by the variable name. Any other way isn't important until much later in your SAS education. Spend your time wisely!
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.