BookmarkSubscribeRSS Feed
Brian_lewis67
Calcite | Level 5
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
3 REPLIES 3
ChrisNZ
Tourmaline | Level 20
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?
data_null__
Jade | Level 19
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.
Brian_lewis67
Calcite | Level 5
The colon format identifier worked perfectly.

Thanks for the replies.

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
  • 3 replies
  • 657 views
  • 0 likes
  • 3 in conversation