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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.