BookmarkSubscribeRSS Feed
David_Billa
Rhodochrosite | Level 12

Will it works if the new data is inserted or if any existing data is deleted?

ChrisNZ
Tourmaline | Level 20
I don't understand the question. As you can see this answers the need you expressed.Adapt the code to your exact data.
David_Billa
Rhodochrosite | Level 12

If my trans data is as below then the MASTER dataset is not updating as we want. I tried to tweak your code but it didn't helped either.

 

data TRANS;
input (Id  Name  Sales   Transaction   Example  Act_Ind   Valid_From  Valid_To) (:$20.);
cards;
4   Track   False  10  121216  Y   20200404T000000   99991231T235959
run;
ChrisNZ
Tourmaline | Level 20

Did you read the document I pointed to?
To insert new records, you need to test for   _DSENOM   and   output   the new record.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 18 replies
  • 4480 views
  • 3 likes
  • 5 in conversation