Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Appending a decimal to a data set name

Status
Not open for further replies.

Medvedeff

Instructor
Feb 12, 2008
29
US
Does anyone know how to append a decimal to a data set name?

For example, I would like to be able to produce something like this:

mylib.Parameter.25
mylib.Parameter.50
mylib.Parameter.75
etc.

I am producing several hundred datasets in this way, with the decimals coded as parameters in a macro.

Obviously, the problem is that SAS tries to read the decimal as a library name, or something along those lines. Any ideas as to how I can get around this?
 
Why do you need the decimal? SAS dataset names cant start with a number or contain a decimal inside (the SAS engine thinks its a member of something). These are rules that have been in SAS since the beginning.

If you need the decimal to have an incremental way of id'ing the dataset just concatenate the number to the dataset name. SAS can read ranges this way.

for example if you would like to do something to datasets a1 - a100 you can by using the '-' operator.

See SAS docs for more info.

Klaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top