Here are the results from the frequency table! Maybe I didn't follow the steps correctly if it didn't show what you needed to see. I downloaded the data2datastep from that instruction page, and I ran it. Then, I ran my data with the variables you stated to show. I'll copy and paste what I did in a second!
Update: here is the log statement showing what I ran below
471 select memlabel ------ 180 ERROR 180-322: Statement is not valid or it is used out of proper order. 472 into :memlabel trimmed 473 from dictionary.tables 474 where libname="&lib" WARNING: Apparent symbolic reference LIB not resolved. 475 and memname="&dsn" WARNING: Apparent symbolic reference DSN not resolved. 476 ;
WARNING: Apparent symbolic reference FMT not resolved. WARNING: Argument 2 to macro function %QSUBSTR is out of range. WARNING: Argument 3 to macro function %QSUBSTR is out of range. 477 %if %qsubstr(%superq(fmt),1,1)=Y %then %do; 478 select strip(catx(' ',Name,format)) 479 into :fmtlist separated by ' ' 480 from dictionary.columns 481 where libname="&lib" 482 and memname="&dsn" 483 and format is not null 484 and format not like '$%' 485 ; 486 %end; 487 %else %let fmtlist=; 488 quit; 489 490 %put _local_; 491 492 data _null_; 493 file "&file" dsd; WARNING: Apparent symbolic reference FILE not resolved. WARNING: Apparent symbolic reference FILE not resolved. 494 if _n_ =1 then do; 495 %if %superq(memlabel)= %then %do; ERROR: Nesting of %IF statements in open code is not supported. %IF ignored. ERROR: Skipping to next %END statement. 496 put "data &outlib..&dsn;"; WARNING: Apparent symbolic reference OUTLIB not resolved. WARNING: Apparent symbolic reference DSN not resolved. 497 %end; 498 %else %do; ERROR: The %ELSE statement is not valid in open code. WARNING: Apparent symbolic reference OUTLIB not resolved. WARNING: Apparent symbolic reference DSN not resolved. 499 put "data &outlib..&dsn(label=%tslit(%superq(memlabel)));"; WARNING: Apparent symbolic reference OUTLIB not resolved. WARNING: Apparent symbolic reference DSN not resolved. WARNING: Apparent symbolic reference MEMLABEL not resolved. WARNING: Apparent symbolic reference OUTLIB not resolved. WARNING: Apparent symbolic reference DSN not resolved. ERROR: The %END statement is not valid in open code. WARNING: Apparent symbolic reference INPUTLIST not resolved. 500 %end; 501 put @3 "infile datalines dsd truncover;"; 502 put @3 "input %superq(inputlist);"; 503 %if not (%superq(fmtlist)=) %then %do; 504 put @3 "format %superq(fmtlist);"; 505 %end; 506 %if not (%superq(lbllist)=) %then %do; WARNING: Apparent symbolic reference LBLLIST not resolved. 507 put @3 "label %superq(lbllist);"; 508 %end; 509 put "datalines4;"; 510 end; 511 set &lib..&dsn(obs=&obs) end=last; - 22 200 WARNING: Apparent symbolic reference LIB not resolved. WARNING: Apparent symbolic reference DSN not resolved. 511 set &lib..&dsn(obs=&obs) end=last; - 22 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, bitstring, INPUT, PUT.
ERROR: Undeclared array referenced: dsn. WARNING: Apparent symbolic reference OBS not resolved. 511 set &lib..&dsn(obs=&obs) end=last; --- 22 ERROR 22-322: Syntax error, expecting one of the following: +, =.
ERROR: Variable dsn has not been declared as an array. 512 put &varlist @; - 22 WARNING: Apparent symbolic reference VARLIST not resolved. ERROR 22-322: Expecting a name.
513 if last then do; 514 put; 515 put ';;;;'; 516 end; 517 else put; 518 run;
NOTE: The SAS System stopped processing this step because of errors. NOTE: DATA statement used (Total process time): real time 0.14 seconds cpu time 0.11 seconds
ERROR: No matching %MACRO statement for this %MEND statement. 519 %mend;
520 proc import out=work.IAT2016_raw 521 datafile="C:\Users\tjoseph6\Documents\My SAS Files\IAT2016.sav" 522 dbms=sav replace; 523 run;
NOTE: Variable Name Change. D_biep.White_Good_all -> D_biep_White_Good_all NOTE: Variable Name Change. D_biep.White_Good_36 -> D_biep_White_Good_36 NOTE: Variable Name Change. D_biep.White_Good_47 -> D_biep_White_Good_47 NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with options MSGLEVEL=I. NOTE: The import data set has 1051105 observations and 534 variables. NOTE: WORK.IAT2016_RAW data set was successfully created. NOTE: PROCEDURE IMPORT used (Total process time): real time 1:14.25 cpu time 27.12 seconds
524 data IAT2016; 525 set work.IAT2016_raw (keep=year birthyear sex_5 raceomb D_biep_White_Good_all countrycit 525! occupation_self politicalid_7); 526 Age=year-birthyear;
NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 454843 at 526:9 NOTE: There were 1051105 observations read from the data set WORK.IAT2016_RAW. NOTE: The data set WORK.IAT2016 has 1051105 observations and 9 variables. NOTE: DATA statement used (Total process time): real time 39.02 seconds cpu time 11.54 seconds
527 proc print data=IAT2016 (obs=20); 528 run;
NOTE: There were 20 observations read from the data set WORK.IAT2016. NOTE: PROCEDURE PRINT used (Total process time): real time 0.07 seconds cpu time 0.03 seconds
529 proc import out=work.IAT2016_raw 530 datafile="C:\Users\tjoseph6\Documents\My SAS Files\IAT2016.sav" 531 dbms=sav replace; 532 run;
NOTE: Variable Name Change. D_biep.White_Good_all -> D_biep_White_Good_all NOTE: Variable Name Change. D_biep.White_Good_36 -> D_biep_White_Good_36 NOTE: Variable Name Change. D_biep.White_Good_47 -> D_biep_White_Good_47 NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with options MSGLEVEL=I. NOTE: The import data set has 1051105 observations and 534 variables. NOTE: WORK.IAT2016_RAW data set was successfully created. NOTE: PROCEDURE IMPORT used (Total process time): real time 1:11.29 cpu time 27.11 seconds
... View more