Closes the dataset referenced by loc_id. Returns a negative value upon failiure, otherwise the operation was successful.