One way you can do it is:
Download the WPS Workbench Community edition. WPS Workbench is a software that read sas files. If you are enrolled in some College/University, you can also download the academic edition (which is free of ads and have extra features). After you install and set it up, open it.
In WPS Environment, open the .sas program: by clicking in
File -> Open Fileand selecting your
.sasfile, which will open in WPS. Set three lines like that:
DATA YOUR_DATA; INFILE 'C:\Users\...\path_to_your_file\YOURDATA.TXT' LRECL=978 MISSOVER; INPUT @18 PROFAM 6. /* progressivo famiglia univoco a livello indagine */ @24 PROIND 2. /* progressivo individuo nell'ambito della famiglia*/
Just choose the name you want for your data in the first line and put the correct path to your
.txt file in the second line.
2.1 Correct the code by: Erasing the line
***Column VarName Varlength VarLabel*** that is between the INPUT statement and the first line of data.
2.2 Check the last two lines after the last variable, it should end something like that:
@235 NCOMPL 8. /* n° rendimento la famiglia attuale */ ; run;
If it is not, add the last two lines above.
- Write the syntax to export your data to a
.csv. Just write the following code at the end of the
proc export data=YOUR_DATA outfile="c:\myfiles\YourData.csv" dbms=csv replace; run;
Make sure to write again the correct name of your file (the one you chose) in the first line, and the correct path where you want the .csv file to be saved in the second line.
ctrl + R to run the code, or click on the run button. Click
Ok in the
Save and run WPS dialog box.
- Finally, open the
CLICK HERE to find out more related problems solutions.