Korn Shell Best Practices

I am new to ksh scripts (still reading manuals). I need to write an application that reads a multi-line parameter file, builds sql on-the-fly, runs plsql and saves the output in a specific format for further processing. I am looking for anything on Best Practices for building such an application. How best to organize it, sub-divide it, test it, down to how best to format the code for clarity. Any book or white paper suggestions would be appreciated.

You already know that you have a task with four parts.
From there, begin writing more details on what you want to accomplish.
Next, start writing some form of code - this does not need to be in correct syntax - but more to understand the needed variables and functions you will need to handle.

Then, begin writing the code in small sections.
Remember the ECHO command can be your best friend when beginning to program and follow you program steps. Then, slowly build thru all of the four parts.

Create some test data, and execute to verify correct processing.

Commenting is always a very good idea. It can help you understand what you were trying to do, what the variable is supposed to store, etc..

Don't get too caught up on elegant coding - for example, doing six things in one long command. As a beginner, it is often best to only do one thing at a time. At least, until you are more familiar with the programming syntax and commands.