DATA Step, Macro, Functions and more

insert data

Reply
Super Contributor
Posts: 648

insert data

One of the excel files I get does not contain header.I use the proc import to create dataset (say A). The first record becomes header.

I created a another dataset with only headers in it (say B).How to append the data from A to B?
Trusted Advisor
Posts: 2,113

Re: insert data

You can import the excel without the row 1 as headers, SAS will name the columns with some default names. You can then use PROC DATASETS to rename the columns.
Super Contributor
Super Contributor
Posts: 3,174

Re: insert data

Depending on your input data file definition, the FILENAME statement supports a concatenation technique, where your input file(s) are listed in sequence and are enclosed with parantheses. Have a look at the FILENAME statement documentation in the SAS companion guide for your particular OS environment.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 2 replies
  • 109 views
  • 0 likes
  • 3 in conversation