# opening .dat  IPUMS file in stata

**URL:** https://forum.ipums.org/t/opening-dat-ipums-file-in-stata/1573
**Category:** CPS
**Created:** [February 6, 2017, 7:30pm UTC](https://forum.ipums.org/t/opening-dat-ipums-file-in-stata/1573 "2017-02-06T19:30:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![haredmah](https://avatars.discourse-cdn.com/v4/letter/h/ce7236/32.png) [@haredmah](https://forum.ipums.org/u/haredmah)
#### Post date: [February 6, 2017, 7:30pm UTC](https://forum.ipums.org/t/opening-dat-ipums-file-in-stata/1573/1 "2017-02-06T19:30:00Z")

</div>

Hello,

I’m trying to open CPS data in stata following the instruction provided in website but I’m it is not working. i saved the .dat file in my desktop and tried to open it in stata using the “do cps\_00001.do” command. I also tried “do cps\_00001.dat” but nothing works.

---

<div class="post-metadata">

### Author: ![JeffBloem](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.ipums.org/jeffbloem/32/40_2.png) [@JeffBloem](https://forum.ipums.org/u/JeffBloem)
#### Post date: [February 7, 2017, 3:12pm UTC](https://forum.ipums.org/t/opening-dat-ipums-file-in-stata/1573/2 "2017-02-07T15:12:00Z")

</div>

I’m sorry for the difficulties. One essential step I didn’t see mentioned above is the .dat file needs to be unzipped before the .do file can read-in the data into stata. We typically suggest [7-zip](http://www.7-zip.org/download.html) for a decompression software if your computer doesn’t already use this as default. Another necessity is to ensure that the working directory is set up correctly in stata, so that it is working in the folder your data file is saved. We have an [online tutorial video](https://usa.ipums.org/usa/tutorials.shtml) if you would like more specific instructions.

I hope this helps.
