I have wordpress blog at sub domian sub.abc.com. I want to trasnfer it to xyz.com. Both domains are on same hosting account. What changes i need to do to complete the process?
People do this all the time, so there are plenty of tutorials for it http://yoast.com/move-wordpress-blog-domain-10-steps/ http://codex.wordpress.org/Moving_WordPress (scroll down to "Moving WordPress to a New Server")
export the posts in wordpress under tools (from existing wordpress) install a new wordpress to main domain, then import posts to the new wordpress delete old wp installation and put in a 301 redirect in your .htaccess files
It requires an .HTACCESS rewrite and some changes in configurations. Search in Google you will find awesome tutorials for that. I have done it part, but do not remember the link to the tutorial.
Its not just export and import, In addition to that you have to make sure that your previous traffic do not see 404 errors and they automatically get redirected to the respective post on the new location. This is the point behind the asker's question.