I need to put the haversine formula in an sql or rpg function on the as400 to calc the distance between to zip codes. I do not have much experience with sql. can anyone give me some help?