03-29-2016 10:36 PM
I'm having trouble programming new variables. This is my partial code:
KEEP DRUGTYP1 SENTTOT0 LOGSENT REAS1 DISTRICT MONCIRC FTRACK CRIMHIST
YEARS CITIZEN NEWCIT NEWEDUC MONSEX NEWRACE OFFTYPE2 MONDRUG
SCHEDULE = .;
IF (DRUGTYP1=Heroin) OR (DRUGTYP1=Marijuana) OR (DRUGTYP1=LSD) OR (DRUGTYP1=MDMA / ecstasy)
OR (DRUGTYP1=Methcathinone) OR (DRUGTYP1=Gamm-hydroxybutyric acid) THEN SCHEDULE=I;
It's fine until I add in the last bit -- "OR (DRUGTYP1=Gamm-hydroxybutyric acid)" - After that it gives me the error code:
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.NEWVARDATA3 may be incomplete. When this step was stopped there were
0 observations and 16 variables.
WARNING: Data set WORK.NEWVARDATA3 was not replaced because this step was stopped
Not sure what's wrong or how I can fix it; I'm using USSC data so I didn't set the level names, nor can I change them. Any way to get around this in the code?
03-29-2016 10:59 PM