Help using Base SAS procedures

Help required on NLMNYw.d informat from Excel input

Reply
Occasional Contributor
Posts: 16

Help required on NLMNYw.d informat from Excel input

Hi I'm new on this forum but couldn't find anything after a search regarding a problem I have with using the nlmny informat function while inputting data in from an excel spreadsheet

The code is below but the table result comes out as null in every observation

data ptd;
infile xl3 notab dlm='09'x dsd missover;
format field1 $8. field2 14.2 field3 $7.;
input field1 $ a $field3 $ c $ d$ field2 nlmny14.2 ;
run;

Field2 is read in from excel and currently has monetry format fields which I need to calculate on.

Can anyone please help?

Thanks,

Brian
PROC Star
Posts: 1,561

Re: Help required on NLMNYw.d informat from Excel input

More information needed imho:

Is it only field2 that is returned missing?

What is the LOCALE option equal to?

What is the raw value of field2? (Read it using character informat)

Any message in the log?
Respected Advisor
Posts: 3,777

Re: Help required on NLMNYw.d informat from Excel input

I was thinking the colon format modifier is need to read DSD data properly.
[pre]
input field1 $ a $field3 $ c $ d$ field2 :nlmny14.2 ;
[/pre]

Knowing more about the log messages would be helpful too.
Occasional Contributor
Posts: 16

Re: Help required on NLMNYw.d informat from Excel input

The colon format identifier worked perfectly.

Thanks for the replies.
Ask a Question
Discussion stats
  • 3 replies
  • 110 views
  • 0 likes
  • 3 in conversation