Good Debugging Practices:Guidance needed

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Good Debugging Practices:Guidance needed

Post by vijayrc »

Hi,
Most companies use DS for DataWarehousing etc and we are using it for our Application Developement. DS is a new product in our place and ours is the first group to be tried out. We are in the learning curve and in the short time, have grasped the tools' capabilities/power etc, and at the same noticed its glitches [particulary debugging part ]
I would like to get some guidance towards this subject. Besides putting in Peek, Copy Stage with Dataset etc etc., in a Application Environment where DS is being used, what would be the best practice to establish useful debug-related stuff. In other words, how do you go about developing your functionality with debugging aspect in mind. I know I'haven't clearly expressed this. Thanks a ton. -Vijay
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Planning and Peer Review
Before you even touch DataStage, sketch out your plan of attack. Which stage types will you use, and why. Sources and targets - are their table definitions in Repository? Are any custom routines needed, or can all logic be performed using available components? Sketch out the transformation expressions you plan to use. Get a colleague to check it. (Get the janitor to check it also - you'd be surprised what they spot that the "experts" miss! Consider Dilbert's garbage man, for example.)

Incremental design
Design the "E" part first and get it working. Tested.
Then design the "T" part - break this down into smaller pieces where possible. Test as you go. Document test results. All the earlier pieces tested OK, so any problems must be in the current piece.
You can use a Copy stage with no output to consume the rows or a Peek stage with no output to consume the rows and direct a sample to the job log.

Test Data
Use Row Generator stage to create test data with which to test your logic.

Compile in Trace mode
This is an option in the job properties dialog. When you run the job, only process a small number of rows; otherwise your trace files will be large and cumbersome. Recompile not in trace mode when done.

Conditionally Compiled Routine Statements
If you develop your own routines or BuildOp, you can use #define to set up tokens and #ifdef to include statements purely for debugging purposes in your code. Disable before promoting out of development.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Good points Ray!
I would vote to move this post to the FAQ forum.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I am putting this in my favourites bucket :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Post by vijayrc »

ray.wurlod wrote:Planning and Peer Review
Before you even touch DataStage, sketch out your plan of attack. Which stage types will you use, and why. Sources and targets - are their table definitions in Reposi ...
thanks Ray..It helps.
Any other suggestions/best practices are welcome and appreciated.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Whilst it's not in the debugging basket, I always add a sanity check to make sure that I'm doing things as efficiently as I know how, especially not processing any data unnecessarily or evaluating any expression more than once per row.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

That is certainly a very good practice. All these things make up for a good design with no room for tuneups :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Much like Jello, there's always room for tuneups. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Let me rephrase myself, "......with little room for tuneups" :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Delighted I am that you have been paying attention, grasshopper. One small step along the path to enlightenment.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Always pay attention to your comments Ray :wink:
Thats how my journey seems to go on towards enlightenment
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply