BookmarkSubscribeRSS Feed
MJM11111
Calcite | Level 5
K
2 REPLIES 2
PaigeMiller
Diamond | Level 26

Most of us will not download Excel files as they can be a security threat. Please include data as working SAS data step code (examples and instructions) and not as Excel files or screen captures. Note: we have told you this previously, you would get much faster and better answers if you followed the instructions we have given you.

--
Paige Miller
ballardw
Super User

@MJM11111 wrote:

Hi, I need help please. i have a data output where there is two fields Model and Model Full. i want to create a 3rd field Called ModelVariance2. in this Field i want to Only show for example, if in the Model if GRAND I10 it should only display the GRAND I10 and nothing else, if the Model Show I20 it should only display I20, if in the Model Field it shows Picanto 1.0 it should only show Picanto in ModelVariant2 field.   this specific sas code need to into production and be sustainable, so i don't need to do any adjustments, i have just included the outcome that i am looking for.  please nay help will be highly appriciated.


You mention 3 specific values and no others. Is this magic code supposed to handle any others?

What if the value is "Grand I10" and not "GRAND I10"? What happens? Those two values to computers are not the same unless we provide instructions on how to handle case of letter differences.

 

 

BTW part way through your description you changed the name of the desired field (I think)

 

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 199 views
  • 0 likes
  • 3 in conversation