DATA Step, Macro, Functions and more

Informats & Formats on Numeric variables

Reply
N/A
Posts: 1

Informats & Formats on Numeric variables

Hi, I came from BI Admin background and a newbie for SAS.

I have a sample Input file

Data SampleDataSet;

Infile 'D:\Samples\SampleDataSet.csv' dlm = ",";

Informat  --- ;

Type CustID $ Name $ Age Amount;

Format  --- ;

Run;

In raw data set; Amount is in this format: $1000.00, 2500.00, "4200.00", $5000.00, "5400.00".

Can any please let me know how to use Informat & Format for the numeric variable shown above.

Thanks in advance

Raj

Respected Advisor
Posts: 3,124

Re: Informats & Formats on Numeric variables

Is this what you are after?

data test;

infile cards dsd;

informat money comma20.;

input money;

cards;

$1000.00

2500.00

"4200.00"

;

Haikuo

Ask a Question
Discussion stats
  • 1 reply
  • 165 views
  • 0 likes
  • 2 in conversation