BookmarkSubscribeRSS Feed
Andalusia
Obsidian | Level 7

This is my current dataset (an example so you can reproduce my case, the real one is much bigger):

data have;
infile datalines truncover;
input type $ model $;
datalines;
XX-1 Light
XX-2 Heavy
XX-3 Heavy
XX-4 Heavy
XX-5 Slim
XX-6 Light
XX-7 Heavy
;

I want to add two lines of data to it:

XX-8 Light
XX-9 Slim

 

1 REPLY 1
Kurt_Bremser
Super User

Create a new dataset, and append it:

data have;
infile datalines truncover;
input type $ model $;
datalines;
XX-1 Light
XX-2 Heavy
XX-3 Heavy
XX-4 Heavy
XX-5 Slim
XX-6 Light
XX-7 Heavy
;

data new;
infile datalines truncover;
input type $ model $;
datalines;
XX-8 Light
XX-9 Slim
;

proc append
  base=have
  data=new
;
run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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 lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 1104 views
  • 0 likes
  • 2 in conversation