debug aix 4.3

what's the best way for debugging in aix 4.3? i have this old aix 4.3 with unknown application that my new company still uses. they want me to complete a script that was working before but the application was very old and software company don't exist anymore. the script monitor the maintenance of the applications (with db2 7). the application has no more code and cannot be recompiled, that's why it cannot be upgraded to aix 5.

thanks,
itik

the script was written in kornshell.

Insert the following 2 lines to your korn shell script right after "#!/bin/ksh":

set -x
PS4='[Line $LINENO]: '

This will turn trace execution. When you run the script, you will see the line number that is being executed and the command the script is about to run.