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

Hi all!!

I have a problem to make an infile of this csv file:

a     b          c                    d

1     asd      10/10/2000     adfg

2     abd      10/10/2000     vdfg

3     afd      10/10/2000      bdf

4     axd      10/10/2000     bfdg

It is ok, when I make the input until data sas(I would like to have data sas in number format without any character format), but after I have a problem to make an import of column d.

The final dataset, shows correctly the columns a,b,c but the columns d is completely missing.

what should I do? how do you make the input file?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Peter_C
Rhodochrosite | Level 12

From the code that was posted earlier...

data infile;

  length   a   8

                b   $4

               dt   8

              cd  $4;

  infile csv firstobs=2 delimiter=';' missover dsd;

  input a

            b $

            dt  ddmmyy10.

            cd  $;

run;

As well as removing that DSD option (but only when appropriate)

I would suggest inserting  : before the ddmmyy10. format.

this ensures the floating -type input continues through the date.

View solution in original post

4 REPLIES 4
Peter_C
Rhodochrosite | Level 12

What code have you tried?

Rakeon
Quartz | Level 8

I have resolved the problem.

it was the dsd option.

it dosn't need.

Peter_C
Rhodochrosite | Level 12

From the code that was posted earlier...

data infile;

  length   a   8

                b   $4

               dt   8

              cd  $4;

  infile csv firstobs=2 delimiter=';' missover dsd;

  input a

            b $

            dt  ddmmyy10.

            cd  $;

run;

As well as removing that DSD option (but only when appropriate)

I would suggest inserting  : before the ddmmyy10. format.

this ensures the floating -type input continues through the date.

Rakeon
Quartz | Level 8

Hi Peter,

it work with : before the data.

Thank you.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 851 views
  • 0 likes
  • 2 in conversation