generates sas code