BookmarkSubscribeRSS Feed
anjgupta
Calcite | Level 5
Hi,

I need to import data obtained via MPLUS. I made an excel file from the data - and imported it into SAS. But a column that was mainly missing (but not fully missing) ended up fully missing in SAS - not sure why.

Thought I should try to INPUT or IMPORT directly from the MPLUS .dat file. MPLUS provides the format as:
AFDC0103 F10.3
AFDC01ON F10.3
AFDC03ON F10.3
MOWK0301 F10.3
HRS0301 F10.3
EARN0301 F10.3
WAGE0301 F10.3
DCP0301 F10.3
BLACK01 F10.3
UNEMP_01 F10.3
POV_2001 F10.3
WLF_RCPT F10.3
ER17016 F10.3
ER17017 F10.3
ER17013 F10.3
HGHGRADE F10.3
GRAD_HS F10.3
ER17002 I5
CPROB1 F10.3
CPROB2 F10.3
CPROB3 F10.3
C F10.3

From an eyeball look - it's not delimited. One issue is that if a field is missing, there's an asterisk left justified (immediately next to the previous data). The nonmissing items in said variable are right justified -

Thanks,
Anjali
1 REPLY 1
ChrisNZ
Tourmaline | Level 20
How about you use the description and :
1- replace F10.3 by 10.3
2- replace I5 by 5.
to create the input statement.

On the data side (in the file):
1- replace StarSpace with SpaceDot

Would that work?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1720 views
  • 0 likes
  • 2 in conversation