Morning,
I'm wondering for character format is it correct to list it as such?
'A00-A14','A20-A38','A40-A99','B01-B14','B25-B89','B91-B99'='All codes of interest'
'V01'-'V99' = 'New codes'
Or do you need to list all individual codes
'A01',
'A02',
'A03'='All codes used here'
Try
'A00'-'A14'
'A00-A14'
constitutes a single string, not a range.
But be aware that a lot of values lie between A00 and A14, like 'A1 '. So you probably want to use
'A00'-'A09','A10'-'A14'
Try
'A00'-'A14'
'A00-A14'
constitutes a single string, not a range.
But be aware that a lot of values lie between A00 and A14, like 'A1 '. So you probably want to use
'A00'-'A09','A10'-'A14'
Many thanks for this. If I know from my data that the values must be of length three, should I get the same from the following?
"A01",
"A02",
"A03",
"A04",
"A05",
"A06",
"A07",
"A08",
"A09",
"A10",
"A11",
"A12",
"A13",
"A14"='My codes'
"A01"-"A14"='My codes'
I'm curious as I've done the following
'A00-A14','A20-A38','A40-A99','B01-B14','B25-B89','B91-B99'='90000 Other codes'
And my proc summary is not producing any results even though I know my dataset has codes such as A04 etc.
@Sean_OConnor wrote:
'A00-A14','A20-A38','A40-A99','B01-B14','B25-B89','B91-B99'='90000 Other codes'
And my proc summary is not producing any results even though I know my dataset has codes such as A04 etc.
To determine what is wrong would require 1) your data set, 2) your proc summary and apparently 3) the complete definition of the format.
But if your values are indeed 'A00' then the above doesn't do what you want because you are creating single value strings.
'A00-A14' is a single value, not a range. A range, which is problematic with character variables would be 'A00' - 'A14'
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.