I am creating a Perl script in which i am using isql command to connect to the informix database . Sometime when there is a problem in query the command is getting hanged because of that script is not throwing any error or getting out of that. I am using below command to connect informix db :
`isql db <<EOF
unload to data DELIMITER ','
select* from tablename
EOF`;
How we can handle the script to quit if this command is not working , how we can check the status of the command.