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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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