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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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