Converting Employment Opportunities Pilot Projects (EEOP) Data to a Different Format

Question:
How do I convert the EEOP data found at : EEOP Data Click here into a different format like Stata, SPSS, Excel, ect. ?

Answer:
Begin by saving the desired EEOP data table to a folder on your U drive while connected to the CISER servers. Click the following link for information regarding your U drive. Managing your Work Environment

In SAS Editor enter the following, replace italics style font with your personal locations and names:

* This denotes is a comment. Create SAS library with same path location as where I saved data table above ;
libname alias “path” ;
run;
* ‘Alias’ is nickname for ‘path’ location.;

* import data and convert into SAS dataset.;
data alias.file_name;
* data statement has 2 part name. Alias for library location. file_name is new SAS data set being created.;

filename trans “path\filename.trn”;
run;

proc cimport infile = trans lib = alias;
* the library specified in “lib=” is the library created at beginning of code.;
run;

EXAMPLE:

* data set I intend to use has been saved to the location “U:\Documents\EEOP test”;
libname tt “U:\Documents\EEOP test”; run;
* ‘tt’ is nickname for the path “U:\Documents\EEOP test”;

data tt.test1;
* below is 1 data set taken from the EEOP file. file name is ui.trn;
filename trans “U:\Documents\EEOP test\ui.trn”;
proc cimport infile = trans lib=tt;
run;

* A new file is placed at the location of my library: “U:\Documents\EEOP test”, and is in the form of a SAS stored data set;

* From this data set I can export to a different form within SAS using proc export. Example below ;
proc export data = tt.test1 outfile = “U:\Documents\EEOP test\new_file.dta”; run;
* the code above will create a new STATA data set, file extension .dta, at the location “U:\Documents\EEOP test”;

Alternative ways to converting the SAS data set into another form is to:

  • Use the desktop application “Stat/Transfer” that can be found on any of the CISER servers.
  • Read the newly created SAS data set while another software is open. Example: The STATA command and syntax for reading in a SAS dataset is as follows:
    usesas using “path\file_name”

 
Quick Links