Besides the transform function implementation, lots of tips in this article, looks simple, but implements complex logic, including: Data reading; SQL proc and pick up value to macro variable; array, retain, loop, condition statements; call missing usage; data step implicit loop... In such little article, combined so many tips, really good!