Code Walkthrough

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bdixon
Participant
Posts: 35
Joined: Thu Nov 20, 2003 5:45 pm
Location: Australia, Sydney

Code Walkthrough

Post by bdixon »

Hi All,

Does anyone tips on code walkthroughs for datastage jobs and batches.

Thanks
Brad
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There isn't a lot of "code" as such, and what there is is DataStage BASIC. Do your interlocutors understand DataStage BASIC?

What I prefer to do is to load up the graphical interface with lots of annotations (they're cost free at execution time) explaining absolutely everything that's going on. For example, I bring out the SQL onto the canvas near an SQL-using stage. There's an annotation outlining what each Transformer stage is doing. There's an annotation specifying what's in each text file - and in a walk through you can use View Data.

And Show Performance Statistics will display row counts on each link.

If they're still skeptical, use the Debugger to show inputs and outputs of Transformer stages and order of execution of links.

Finally, for the bigger picture, the Director shows what ran, when, and with what outcome.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

The main area of code review for inexperienced users, and some traps I fell into early on:
- lack of knowledge about stage variables. In particular having the same code appearing several times in a transformer (in several constraints and derivations) when it could be used once in a stage variable and then use the stage variable multiple times.
- not enough use of routines. The same calculation or formatting code appearing time and time again in different jobs. A reusable routine can simplify transformer code and is maintainable and easier to test.
- better ways of doing things in routine code. In particular how to use arrays, some advanced features of the format commands, using case statements instead of embedded ifs. etc.

Your code reviews and walkthroughs will be very important in the first few weeks of your project to ensure everyone is using the same standards and should become routine and bried as people become more experienced.
Post Reply