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 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 6 replies
  • 730 views
  • 5 likes
  • 4 in conversation