If your having difficulty with something, then you will need to post exact and complete test data which covers the issue. Follow;
https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712
I can't tell anything from what you have posted about the data. There are a couple of typos in what you have posted though:
rdummy{i}=nyc * dummy{i}; If nyc or dummy{i} is missing then multiplication wont work if dummy{i}=1 & nyc=1 then rdummy{i} This doesn't do anything, no assignment, missing semicolon, you also drop the =1 from both checks as if 1 is always true. logic{i}=ifn(nyc and dummy{i},1,0);
... View more