My knowledge needs updating.
All vehicles I touched before this year are pre-1996 models. I did clear DTC by disconnecting power for various cars. Now, I realize many cars since last 10 years have changed. DTC in GM, Ford cars can only be cleared by a scan tool. Chrysler cars can clear DTC ifself after 50 key cycles if the problem does not reappear. Japanese car makers are traditionally conservative toward new technology. Some of them like Toyota still permit a user to clear DTC by cutting off power.
To my surprise, to retrieve ABS trouble code of 1997 RAV4, I have to use a legacy method --- jump a special diagnostic port with a wire and count how many times the Check Engine light flashes. In the field of automotive electroncs, although more reliable, imported cars are still a few years behind domestic cars.