@Kurt_Bremserit says that the variable SIC is character yeah I figured proc contents is not the solution. This is the first time I used this so I'm not sure what to do exactly. so after going youtube and taking in you guys' suggestions this is what I've got so far: CODE libname mydata '/folders/myfolders/Company data'; data work.banks; set mydata.UK_Quarterly; keep SIC CONML; proc freq data=mydata.uk; tables work.banks; where SIC =: '6000'; data mydata.uk; set mydata.uk; if SIC= '6000' then output; run; LOG 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 72 73 libname mydata '/folders/myfolders/Company data'; NOTE: Libref MYDATA was successfully assigned as follows: Engine: V9 Physical Name: /folders/myfolders/Company data 74 data work.banks; 75 set mydata.UK_Quarterly; NOTE: Data file MYDATA.UK_QUARTERLY.DATA is in a format that is native to another host, or the file encoding does not match the session encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce performance. 76 keep SIC CONML; 77 78 NOTE: There were 135194 observations read from the data set MYDATA.UK_QUARTERLY. NOTE: The data set WORK.BANKS has 135194 observations and 2 variables. NOTE: DATA statement used (Total process time): real time 24.62 seconds cpu time 10.96 seconds 79 proc freq data=mydata.uk; 80 tables work.banks; __________ 22 201 ERROR 22-322: Syntax error, expecting one of the following: a name, (, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_. ERROR 201-322: The option is not recognized and will be ignored. 81 where SIC =: '6000'; ERROR: Variable NAME not found. 82 NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE FREQ used (Total process time): real time 0.01 seconds cpu time 0.00 seconds 83 data mydata.uk; 84 set mydata.uk; 85 if SIC= '6000' then output; 86 run; NOTE: There were 0 observations read from the data set MYDATA.UK. NOTE: The data set MYDATA.UK has 0 observations and 474 variables. NOTE: DATA statement used (Total process time): real time 0.06 seconds cpu time 0.02 seconds 87 88 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 100 DO you know if there's a website that do SAS for me?
... View more