Hello, I am sorry in advance for the newbie question. I am Stata user and I am trying to learn SAS for a new project. I downloaded data from a government agency that provides datafiles in SAS. I am able to import SAS data into Stata easily but it does not include the value labels for the variables. The agency also provides three SAS scripts (.sas files) with the codes for formatting, labeling, and proc formatting. I'll provide some examples below: SAS Format Assignment Statements FORMAT ACADV $YES_NO_CODES.;
FORMAT ACCAR $YES_NO_CODES.;
FORMAT ACCCEP $YES_NO_CODES.;
FORMAT ACCHG $YES_NO_CODES.;
FORMAT ACDRG $DEGREE_CODES.; SAS Label Assignment Statements LABEL ACADV = N_ED_REF_WK_ENROLL_REAS_ADVANCEMT;
LABEL ACCAR = N_ED_REF_WK_ENROLL_REAS_BEGIN_CAREER;
LABEL ACCCEP = N_ED_REF_WK_EMP_ASSISTANCE;
LABEL ACCHG = N_ED_REF_WK_ENROLL_REAS_CHG_FLD;
LABEL ACDRG = N_ED_REF_WK_WORK_DEGREE; SAS PROC FORMAT statements PROC FORMAT;
/* AGEGR DIFAGEGR */
VALUE AGE_GROUP_CODES
20 = "20: Ages 24 or younger"
25 = "25: Ages 25-29"
30 = "30: Ages 30-34"
35 = "35: Ages 35-39"
40 = "40: Ages 40-44"
45 = "45: Ages 45-49"
50 = "50: Ages 50-54"
55 = "55: Ages 55-59"
60 = "60: Ages 60-64"
65 = "65: Ages 65-69"
70 = "70: Ages 70-75"
98 = "98: Logical Skip"
. = "Missing"
;
/* GRLOANR GROWER UGLOANR UGOWER */
VALUE $AMOUNT_BORROW_OWE_2D
"01" = "01: Did not earn a degree at this level"
"02" = "02: $0"
"03" = "03: 1 - 10000"
"04" = "04: 10001-20000"
"05" = "05: 20001-30000"
"06" = "06: 30001-40000"
"07" = "07: 40001-50000"
"08" = "08: 50001-60000"
"09" = "09: 60001-70000"
"10" = "10: 70001-80000"
"11" = "11: 80001-90000"
"12" = "12: 90001 or more"
" " = "Missing"
;
Is there a way I can read these files into SAS to add the value labels to the dataset? Then, I plan on exporting a .sas7bcat to upload to Stata. Is this a good plan? I've tried troubleshooting today but I can't seem to get anything to run successfully. Thank you for your help! -M
... View more