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.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1532 views
  • 0 likes
  • 2 in conversation