BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SASdevAnneMarie
Barite | Level 11

Hello Experts,

 

I'm wondering if it is possible to import the csv file from 3rd row please ?

 

Thank you !

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

@SASdevAnneMarie wrote:

proc import 🙂


Quick answer: don't.

It's not worth to use IMPORT and having to clean up the mess later. Write the data step yourself, according to the documentation of the file. You get full control over types, informats, formats, and where to start reading the data.

 

We read hundreds of files, and not one of the jobs uses PROC IMPORT.

View solution in original post

6 REPLIES 6
PeterClemmensen
Tourmaline | Level 20

Are you using the Data Step or PROC IMPORT?

SASdevAnneMarie
Barite | Level 11

proc import 🙂

Kurt_Bremser
Super User

@SASdevAnneMarie wrote:

proc import 🙂


Quick answer: don't.

It's not worth to use IMPORT and having to clean up the mess later. Write the data step yourself, according to the documentation of the file. You get full control over types, informats, formats, and where to start reading the data.

 

We read hundreds of files, and not one of the jobs uses PROC IMPORT.

SASdevAnneMarie
Barite | Level 11
Thank you, Kurt !
PeterClemmensen
Tourmaline | Level 20

While I do agree with @Kurt_Bremser, your answer to the Proc Import problem can be found in the thread below 🙂

 

https://communities.sas.com/t5/SAS-Procedures/variable-names-in-quot-row-2-quot-how-to-let-PROC-IMPO...

Patrick
Opal | Level 21

Proc Import gives you less control what happens than a SAS data step which is why quite a few people don't like to use it but....

Have a look into the datarow statement. That should do what you're looking for.

https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p08ss3c3xtt2qzn1fsma45gyz333.htm 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 6 replies
  • 1051 views
  • 5 likes
  • 4 in conversation