The log file reports syntax and (some) data errors. If the "code is not working", and you don't have a syntax or data error, then you probably have a logic error, which means that you told SAS to do something, but that something either never happens, or happens under different circumstances than you expect. Also, make sure that your specifications actually match the data.