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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.