Search found 65 matches

by djm
Sat Nov 25, 2006 8:28 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Profile all Jobs end-to-end
Replies: 16
Views: 13127

Rod, you are correct, the purpose of single_row_sc is to generate a single row. You have two choices: (a) In the zip file there are three objects beginning with the name "singlerow". By default, "singlerow_20051003.xml" is the Unix one. Within DataStage, if you delete the object ...
by djm
Tue Mar 28, 2006 4:00 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Recursive Row Split and Append
Replies: 10
Views: 4841

Probably a dopey question, given you have flagged that your server is Windows, but just in case you have flagged your DataStage Client as Windows but your DataStage server is UNIX, there is a simple solution. Alternatively, if you are using a DataStage Windows server, you could install the Microsoft...
by djm
Thu Mar 23, 2006 11:31 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Horizontal Pivot
Replies: 10
Views: 4760

Ahh, but my programming layout style would have laid out your "core" code like so: { gsub(/|/, "\n" $1 OFS); print $0; } for maintainability reasons. I don't know whether that makes mine 2 or 4 lines! By the way, nice implementation of a "leave this as an exercise for the re...
by djm
Thu Mar 23, 2006 7:04 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Horizontal Pivot
Replies: 10
Views: 4760

A much simpler awk script that that listed above would achieve what you need. Have a look at this thread . There is a reply that I contributed that is very close to what you are after. Tweak the awk script in that and you will have what you need. Suggestion: if you end up with an awk script with mor...
by djm
Wed Mar 08, 2006 1:33 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Data Manipulation in a Flat file
Replies: 15
Views: 6789

An awk script is one way. e.g. awk -F, ' { for ( i = 1; ( i <= NF ); i++ ) { print $0 "$" $i } }' yourfile > new file Testing the script cat | awk -F, ' { for ( i = 1; ( i <= NF ); i++ ) { print $0 "$" $i; } }' << EOD 222,333,4444 235, 5644,453 423,8576,764,353 764,431,533 EOD yi...
by djm
Tue Mar 07, 2006 3:11 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: How can perform incremental loading without using key
Replies: 2
Views: 1661

Satish, The solution I am suggesting is on the basis that the following understanding is correct. Namely, that you have two files: A: The "master" which represents the current state and B: The file holding records that may have potentially changed You want to take only those records in B t...
by djm
Mon Mar 06, 2006 11:49 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Lookup from delimited sequential file
Replies: 9
Views: 4288

An alternative approach may be to preprocess the file using UNIX commands, deriving a commonly formatted record per line in the file. The target would be to have each row in the file with two columns; one is the "group by" and the other is the value. It will then not matter how many column...
by djm
Sat Mar 04, 2006 3:36 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Job Log - get the entire content using DS job
Replies: 12
Views: 14563

Correction to JobLogGet

Update to JobLogGet routine to resolved issue identified by vaby in the original code. Thank to vladimir for persevering while I found the time to correct the problem. The complete code in this post can be downloaded as part of a zip file from this web page. This may be easier than having to copy ea...
by djm
Wed Mar 01, 2006 2:08 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Select First Record only
Replies: 12
Views: 4980

And if your flavour of unix does not have "-s" for stable sorting, you may be able to use "sort -k1,1 -u" instead. According to the man pages I have seen, this will suppress duplicates based solely on the key field. Unfortunately, the man page for sort gives no indication which o...
by djm
Wed Mar 01, 2006 12:00 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Select First Record only
Replies: 12
Views: 4980

Belatedly throwing in an approach using UNIX ... sort -s -k1,1 yourfile | awk ' BEGIN \ { prev_key = ""; } ( $1 != prev_key ) \ { print $0; } { prev_key = $1; } ' > firstrowforkey Caveats: 1) requires your sort command to have the "-s" option 2) requires my off-the-cuff awk scrip...
by djm
Wed Feb 22, 2006 2:11 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: how to execute unix sleep function in datastage
Replies: 3
Views: 2842

If all you are looking to do is pause for 60 seconds, the after job sub-routine command simply needs to be:

Code: Select all

sleep 60
i.e. there is no need to write your own shell script wrapper to the sleep command. Invoke sleep directly.

David.
by djm
Mon Feb 13, 2006 4:03 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Tricky Requirement
Replies: 4
Views: 2692

If you end up having to write a UNIX shell script as part of your solution, one command that you are likely to find useful is "find" ("man find" for more details). Although this can be a tricky command to master, it is very powerful. For example find /REP \( -name "*.TXT&quo...
by djm
Thu Jan 19, 2006 3:24 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: reconciliation of source data and target data
Replies: 13
Views: 9530

I was trying not to presume about any flavour of UNIX tools on a Windows server since that is not necessarily a standard scenario. But suggest away I will ... There could be a fairly straight forward UNIX solution on the premise that an export from both Oracle and DB2 of the respective tables can be...
by djm
Thu Jan 19, 2006 4:14 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: reconciliation of source data and target data
Replies: 13
Views: 9530

Yui,

can you just confirm for me that, as per your message description, your DataStage server is a Windows server and not a UNIX server. If it is a Windows server I don't have an alternative to offer but if it is a UNIX server, there is another option that I can suggest.

David
by djm
Thu Jan 12, 2006 1:34 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Job status for running
Replies: 15
Views: 9579

Indrani, My suggestion depends on which of the following you are trying to achieve: 1) Get information about a particular job. A) Try looking at the documentation on the "dsjob" command in the manuals. This command will allow you to output different flavours of information about a job and ...