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!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.