DATA Step, Macro, Functions and more

informat commaX

Accepted Solution Solved
Reply
Contributor
Posts: 53
Accepted Solution

informat commaX

Hello,

I am using a data step to import data from a csv file via the following code

---------------------------------------------------------------------------------------------------------

data lls_dat.p_impairment&einlesemonat;

      infile 'Impairments.csv' dsd dlm=';' firstobs=3;

      input Impairment :     CommaX21.2;

      format Impairment CommaX21.2;

run;

---------------------------------------------------------------------------------------------------------

The csv-File contains multiple values in the format 12.123.123, that shoud be importet as 12.123.123,00.

However they are imported as 121.231,23!?

What did I do wrong?

thx, Stefan


Accepted Solutions
Solution
‎06-01-2012 08:53 AM
Respected Advisor
Posts: 3,799

Re: informat commaX

Get rid of the 2.

View solution in original post


All Replies
Solution
‎06-01-2012 08:53 AM
Respected Advisor
Posts: 3,799

Re: informat commaX

Get rid of the 2.

Contributor
Posts: 53

Re: informat commaX

Posted in reply to data_null__

I tried that, but it still does not work :-(

Respected Advisor
Posts: 3,799

Re: informat commaX

You changed the INFORMAT?

input Impairment :     CommaX21.0;

Contributor
Posts: 53

Re: informat commaX

hmm, I think it does work after all, thanks ;-)

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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