BookmarkSubscribeRSS Feed
echo777
Calcite | Level 5

Hi All,

 

are there differences between string and list in SAS? 

 

if I want to make a list from strings, what should I do?

 

Thanks in advance.

3 REPLIES 3
Astounding
PROC Star
SAS uses very different concepts. Each field in a SAS data set is defined as being numeric or character, and has a set length. Fields are padded with trailing blanks as needed in order to reach their defined length.

The concept of a list can be constructed by defining an array in a DATA step. All arrays are temporary and exist for the duration of that DATA step only. So ARRAYS is one topic you may need to understand.

A final topic you may need to study is VARIABLE LISTS. SAS contains several shortcut for referring to a set of fields.
Patrick
Opal | Level 21


"are there differences between string and list in SAS"

SAS doesn't really have a concept of lists and there aren't any abstract data types.

 

"if I want to make a list from strings, what should I do?"

See above. There are no lists but there are always ways to get to the result you need. What is it that you need to achieve?

ballardw
Super User

@echo777 wrote:

Hi All,

 

are there differences between string and list in SAS? 

 

if I want to make a list from strings, what should I do?

 

Thanks in advance.


An explicit example of what your are attempting would likely be a good idea.

 

The only LIST called such I have encountered with SAS is in the SAS/AF and FSP modules used with the Screen Control Language subsystem to hold things like drop down list, radio button or option button options or selections.

 

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 965 views
  • 0 likes
  • 4 in conversation