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.
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 save with the early bird rate—just $795!
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.