DATA Step, Macro, Functions and more

create a variable

Reply
N/A
Posts: 0

create a variable

how create a new variable in existing datastep
Super Contributor
Super Contributor
Posts: 3,174

Re: create a variable

Look at the LENGTH, FORMAT, INFORMAT and/or the ATTRIB statement for declaring a SAS variable in a DATA step.

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: create a variable

thanks a lot.

I want to create a variable existing data set with out any value.
New Contributor BW
New Contributor
Posts: 2

Re: create a variable

default is missing and that should imply as `without any value'
Super Contributor
Super Contributor
Posts: 3,174

Re: create a variable

As suggested, try declaring a LENGTH or ATTRIB statement for your variable - the initial value will be the SAS "missing value", essentially null (numeric type) or blank (character type).

Scott Barry
SBBWorks, Inc.

Recommended Google advanced search argument, this topic/post:

data step programming new variable length attrib missing value site:sas.com
Ask a Question
Discussion stats
  • 4 replies
  • 158 views
  • 0 likes
  • 3 in conversation