Sensex rallies 321 points on upbeat macro data; Nifty ends at record high of 12,283 | Sharefundss