BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
GN0001
Barite | Level 11
Hello team,
I have proc append;
Proc append base=import_data data=import_ data_in force;
Run;
Do we need to have first dataset in sas or in our directories to be able to append second dataset to the first dataset?

Thanks for your response!
🙏🙏🙏 blue & blue
Blue Blue
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

If IMPORT_DATA does not exist, then PROC APPEND goes ahead and appends IMPORT_DATA_IN to an empty data set; essentially the result in IMPORT_DATA_IN

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

If IMPORT_DATA does not exist, then PROC APPEND goes ahead and appends IMPORT_DATA_IN to an empty data set; essentially the result in IMPORT_DATA_IN

--
Paige Miller
ballardw
Super User

Using the Force option and data set names like Import_data_in (note that your "import_ data_in" has a space in the name and will throw an error) makes me think you may be relying on Proc Import for the data read step. If so, be prepared for lots of warning about mismatched variable lengths and truncated data, warning of variables not in the base data so variables will be lost on append and possible even failure if same named variables are of different types than in an existing base data set.

GN0001
Barite | Level 11

Hello,

Here, when I came to type in, I inserted a space, there is no space in the original code.

blue&blue

Blue Blue
ballardw
Super User

@GN0001 wrote:

Hello,

Here, when I came to type in, I inserted a space, there is no space in the original code.

blue&blue


Easy solution: Copy text from editor or Log. Open text box with the </> icon. Paste text.

No fuss, no muss and quicker than retyping.

 

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

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
  • 4 replies
  • 903 views
  • 2 likes
  • 3 in conversation