I have a bit of a beginner's question regarding Datastage's parallel transformer and code placed into the destination derivation.
I was looking at some old custom-made server routines the other day and saw that any custom routine could be "tested" outside of the job. That is to say, pretend that I created and coded a custom server routine called "ConvDate"; I could open up the properties for that routine in Manager and click a "test" button that would evaluate any given input against the routine's code. It's very useful to see--at a glance--what the routine will do to "real" data.
That server function got me thinking about the px transformer and how code placed in the destination derivation has no way of being tested before the program is run. Yes, Datastage will tell you (quickly!) if the code is valid, but it will not give you a medium by which you can evaluate any given data against your own code.
For instance, we had a server routine that formatted decimal datatypes for COBOL on a mainframe. It was complex code in the custom-made server routine but nice to have the ability to go into Manager and see that, yes, indeed, 12345.67 becomes +00123456700 when tested against the routine. It would be wonderful to have this same ability when it comes to the px transformer, as well... for when I went to go code the derivation for a parallel job that demanded similar formatting, I had to jump through all sorts of hoops to achieve the same result. At it's worst (and at my most stupid) the code would end up:
Code: Select all
If DSLink9.COLUMN_NAME < 0 Then "-":Str(0,10-Len(Trim(DecimalToString(((DSLink9.COLUMN_NAME*1000)/100),"suppress_zero"),".","A"))):Trim(DecimalToString(((DSLink9.COLUMN_NAME*1000)/100),"suppress_zero"),".","A") Else "+":Str(0,10-Len(Trim(DecimalToString(((DSLink9.COLUMN_NAME*1000)/000),"suppress_zero"),".","A"))):Trim(DecimalToString(((DSLink9.COLUMN _NAME*1000)/100),"suppress_zero"),".","A")
The closest thing I could think of was to have a row generator push sample data through a transformer with the code, and then to a peek stage... but that's almost as bothersome as just running the job and seeing where I end up.
I know it's a long post, but I guess I'm thinking out loud... does anyone know of a better way to test sample data that goes into a px transformer against a particular line of code? Am I missing a feature? Or perhaps there's some sort of comparable feature in 8.0?
Thanks for your time, Gurus!