I have data in the format where there are variable from eci01nam to eci20nam. Only one value would be present for each observation.
i want to get that non missing value into new variable.
Use a CAT function to pull the information in.
WANT = CATS(of eci01nam-eci20nam);
@yashraj89 wrote:
I have data in the format where there are variable from eci01nam to eci20nam. Only one value would be present for each observation.
i want to get that non missing value into new variable.
Use a CAT function to pull the information in.
WANT = CATS(of eci01nam-eci20nam);
@yashraj89 wrote:
I have data in the format where there are variable from eci01nam to eci20nam. Only one value would be present for each observation.
i want to get that non missing value into new variable.
I think it will work but first i have to convert the variable numeric suffix. It throughs the error
ERROR: Missing numeric suffix on a numbered variable list (eci01nam-eci18nam).
ERROR 71-185: The CATS function call does not have enough arguments.
@Reeza Mam , Are you telling me you forgot coalescec?
WANT = coalescec(of eci01nam-eci20nam);
Or did you not have coffee or you must be tired?
You're right. I was using a handheld where I couldn't actually see the sample data. Oh well.
Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.