# Converting "Proc format"SAS to "value labels"SPSS

#### pinkusiti

##### New Member
Hello to all,

I'm new here and my english is quite not fluent at all. So sorry for my english.

For my issue, I'd like to try to adapt a SAS code program into SPSS. I'm still a newbie at those softwares that's why I am a bit bothered with some stuff that may appear like a piece of cake for you.

To make things short, I want to adapt a data classification code run under SAS onto SPSS. My rawdata are a census with ages and degree (diploma). I want to process a format to create age classes for the variable called 'age', and then create 2 different formats of degree classes for the variable 'degree'.

Here is the SAS code I'd like to adapt :

**************

libname census "C:\RecenspopSAS";
options compress=yes;
proc format;

value age low-25 = "< 25 y.old (included)"
26-54 = "Ref : From 26 to 54 y.old"
55 - high = "> 55 y.old";

value $diploma "01", "02", "03" = "1:No diploma" "11", "12" = "2:CEP, BEPC" "13", "14" = "3:CAP, BEP" "15" = "4:Bac g" "16" = "5:Bac tech" "17" = "6:1st cycle" "18" = "7:2nd and 3rd cycle"; value$diplomaBis "01", "02", "03", "11", "12", "13", "14" = "Less than BAC"
"15", "16", "17", "18" = "Bac or better";

***************

Till now, I've tried on SPSS the "Value Labels" function but I don't succeed in :
- clustering values into classes like in : "13", "14" = "3:CAP, BEP". Perhaps my syntax is wrong?
- selecting data with a logical link : > 55 y.old or < 25 y.old.
- creating 2 different formats for the same variable.

Besides, I noticed it's possible to "Transform/recode" variables. This seems prometting but I can't do exactly what I want since it erases my rawdata.
I've also seen that it's possible to automatically import formats from SAS to SPSS, is that right?

Data management between these 2 softwares is so different that I afraid I'm heading nowhere. Has anybody tried to do this kind of treatment? What have you done?

Well, after fetching in many pages in english... my head's gonna explode.