BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Nietzsche
Lapis Lazuli | Level 10

Hi, I am reading page 148 of the official specialist prep guide, in it, it states that initial value can be character in the RETAIN statement, which is used for initialising a sum variable. But how can a character value be added together? How can A + A or A+1?

What circumstances can initial value be a character variable/value?

thanks

Nietzsche_0-1667853819264.png

 

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

I am reading page 148 of the official specialist prep guide, in it, it states that initial value can be character in the RETAIN statement, which is used for initialising a sum variable.

 

RETAIN does not have to be used for a sum variable. It can be used for many other purposes, such as retaining a character value from a previous observation. So, initialising a character variable with a character value makes perfect sense.

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

I am reading page 148 of the official specialist prep guide, in it, it states that initial value can be character in the RETAIN statement, which is used for initialising a sum variable.

 

RETAIN does not have to be used for a sum variable. It can be used for many other purposes, such as retaining a character value from a previous observation. So, initialising a character variable with a character value makes perfect sense.

--
Paige Miller
Nietzsche
Lapis Lazuli | Level 10

oh okay, thanks.

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2 replies
  • 749 views
  • 0 likes
  • 2 in conversation