Hi, I am new to DS. Now clo9cking 8 hours. My CV has been updated.
ANyway, I am writing a function and need to debug it. How can I do this? Is there a tool or utility I can put it in and check it. I am not that good with basic code and using a debugger is the best way, I feel, to learn.
Thanks
Regards
Ian
Debugging Basic Code in a function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 1
- Joined: Fri Feb 10, 2006 12:25 am
- Location: Johannesburg
The tool with which you write a routine in DataStage not only allows you to write and compile it, but it also has a "test" button which lets you call it independantly from a DataStage job. and to pass parameters to it. This is what is used to debug most routines. The DataStage engine has a source-level debugger for code, but this is not available in the graphical front-end and I've found the "test" facility along with judicious use of a PRINT statements for debugging purposes is more than enough.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Charter Member
- Posts: 166
- Joined: Wed Mar 16, 2005 6:52 am
- Location: Mumbai, India
You may need to double-click the results section in the test grid to see the output of the print statements though.
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I prefer to use DSTransformError() or DSLogInfo() to PRINT. You can also use compiler directives $DEFINE, $IFDEF, $IFNDEF, $ELSE and $ENDIF to "conditionally compile" your debugging statements. When debugging is done, simply change $DEFINE to $UNDEFINE and recompile, and your debugging statements - though remaining present in the source code - are no longer compiled in the working routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Consider building the "Ans" result as a text string during development. When you run the test button, you'll be able to double-click on the results and see a verbase description of results. When finished, change the derivation for "Ans" to just return the appropriate result.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle