Search found 210 matches

by sbass1
Tue Apr 14, 2009 7:36 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Routine returning invalid results
Replies: 12
Views: 7464

Take your Routine and paste the logic into a Batch:: style job. Add DSLogInfo() lines to write output to the job log. For developing long routines or functions this can be a useful device. Once you figure out where your logic goes bad, you'll be able to fix your actual Routine. Thanks Ken, I'll try...
by sbass1
Tue Apr 14, 2009 7:31 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Routine returning invalid results
Replies: 12
Views: 7464

Hi Craig, Well... you are simply setting it to the value of "Temp" so whatever is in there at the time is what you end up with. Is this a leftover value from a previous step that did not get cleared perhaps? The only place I see that value is in DataColumns<36> but it is in the ValidateCol...
by sbass1
Tue Apr 14, 2009 9:22 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Routine returning invalid results
Replies: 12
Views: 7464

Thanks Kim, I appreciate the input. Regardless of whether I walk away from this approach or not, does anyone have an idea why: GL4Product: * No validation but need to save value of GL4Product for later use ; GL4Product = Temp; RETURN(0) would turn: Audit="" (as proven by debugging statemen...
by sbass1
Tue Apr 14, 2009 8:32 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Routine returning invalid results
Replies: 12
Views: 7464

Routine returning invalid results

*** I've edited this post to include the entire routine and added the log results *** Hi, This post is related to http://www.dsxchange.com/viewtopic.php?t=126507. Scroll down to my second post in that thread. First of all, apologies for the long post. I'd considered putting the code on Google docs,...
by sbass1
Tue Apr 14, 2009 12:28 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Load entire data record into array and process in routine
Replies: 5
Views: 2894

Did you not know that you can rearrange the order of any grid in DataStage? Select the "key" column - usually the leftmost - and slide it up or down, usually using the right mouse button for the drag/drop but just occasionally the left (ya gotta love the consistency). Create a new job - y...
by sbass1
Mon Apr 13, 2009 11:28 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Load entire data record into array and process in routine
Replies: 5
Views: 2894

I coded all the "mandatory" validations per my initial posting. I've now found I missed a number of "additional constraint" validations from the specification. I'd like the code to be written in the same order as the source data column specification in the spec, and I'd like the ...
by sbass1
Mon Apr 13, 2009 10:25 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Load entire data record into array and process in routine
Replies: 5
Views: 2894

Load entire data record into array and process in routine

Hi, I have a job where I need to do data validations on about 50 columns, and reject the row if any column fails validation. My current approach is something like (incoming link is "Extract"): Stage Variables C1-C50, plus Audit and InvalidRecord C1: If Not(Extract.Var1 Matches "FOO&qu...
by sbass1
Mon Apr 13, 2009 7:30 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: checking file existence, moving and writing to target table
Replies: 5
Views: 3144

I would write a script that would check the existence of the file and move it to the new directory. Either write "File Exists" / "File Does Not Exist" to STDOUT or pass a return code. Call this script from a ExecCmd stage in a sequence job. Pass the cmd output as a job parameter ...
by sbass1
Mon Apr 13, 2009 4:19 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: calling scripts using Execsh
Replies: 8
Views: 2650

In my script I am saving the wordcounts of CSV files to /opt/IBM/count_<<yesterdays date>.txt and i need to call this as the input file in the sequential stage. seq.stage--->Trf---->ODBC.Stage. i want to use before sub routine and the script will give me the file in the above format. but i want to ...
by sbass1
Mon Apr 13, 2009 3:57 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: setting a peek stage in a developed job
Replies: 5
Views: 2783

What's nice about the transformer stage is it's easy to drag columns from the input to output links and vice versa. When I'm working with a stage that doesn't support this, what works for me is to save the metadata from the desired (old) link, then copying that to the new link. So, in this scenario,...
by sbass1
Thu Apr 09, 2009 12:08 am
Forum: General
Topic: How to detect end of file
Replies: 2
Views: 1420

Thanks Craig. The question was in relation to viewtopic.php?t=126366&highlight=.

My workaround was essentially the 'pre-count' approach, joining the table back with itself based on the RowNum.
by sbass1
Wed Apr 08, 2009 6:48 pm
Forum: General
Topic: Reading sequential file empty columns NULL vs. Empty String
Replies: 8
Views: 7970

Several approaches: 1. Process the input line as one long string. Which I'm already doing to validate that the source file contains required number of columns. For this conversion, it needs to be exactly tilde-space{1,}-tilde , to tilde-tilde . Other fields may have one or more embedded spaces which...
by sbass1
Wed Apr 08, 2009 5:16 pm
Forum: General
Topic: Reading sequential file empty columns NULL vs. Empty String
Replies: 8
Views: 7970

Thanks. Does DS have the equivalent of:

Code: Select all

s/~\s+~/~~/g
i.e. replace tilde-one or more spaces-tilde to tilde-tilde, in a transformer? Otherwise I'd use a sed script to pre-process the file.
by sbass1
Wed Apr 08, 2009 9:34 am
Forum: General
Topic: Reading sequential file empty columns NULL vs. Empty String
Replies: 8
Views: 7970

Revisiting this topic... If my tilde delimited sequential file has data like: FOO~ ~BAR~ ~ ~BLAH are there settings in the format tab of the sequential file stage that will convert the embedded spaces to empty string, i.e. '' rather than ' ' In the format tab of my sequential stage, I'm trying: LHS:...
by sbass1
Wed Apr 08, 2009 4:12 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Need help with pivoting columns
Replies: 13
Views: 7268

or simply sort the incoming data and append to existing using stage variable. Something like sort input -> tx -> hashed file and in tx do yourStgField = if (prevKey = Key) then inField Else yourStgField : delim : inField where yourStgField is a stage variable. Sainath's reply gave me a few ideas......