On locating numbers and codes of zero divisor graphs associated with commutative rings