in reply to script to test DB2 runtime client

The general approach to doing such checks is to first identify what steps you would take manually, and second to write programs to retake those steps automatically.

As we don't know what steps you would take yourself to ensure that DB2 connectivity is proper, it would help us to help you better if you told us what steps you would take yourself to ensure that DB2 connectivity is proper. For a general idea I can point you towards the DBI documentation, as I would issue some select statements through DBI to check that the DB2 connectivity is proper.