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
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.
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.
oh okay, thanks.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.