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.

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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