Search found 78 matches

by bhasds
Sat Sep 01, 2012 12:43 pm
Forum: General
Topic: getting execute command stage output
Replies: 13
Views: 22402

Hi bobbysridhar,

The below command in execute command activity can give you the output.
Then you can pass the command output to the start loop activity(space as delimiter) and to the job

Command-

Code: Select all

cat  filename|xargs| tr -d '\n'
Please correct me if I am wrong.
by bhasds
Mon Aug 27, 2012 12:20 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: External Filter
Replies: 1
Views: 1109

Hi Rphani, If you are using the sequential file stage , then you can use the Filter option in properties tab.You can try the below command in the Filter option to discard trailing records and null records- nawk -F"|" '{if ($1 !~ "Tr") print $0}' count | grep . I have assumed that...
by bhasds
Fri Aug 24, 2012 12:14 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: In line sort before join
Replies: 7
Views: 4020

Join stage by default will insert tsort operator in both the dataset prior to join if we do not sort the datasets explicitly.This can be seen in the Job score.Please refer to the below post for more information.
viewtopic.php?p=191759
by bhasds
Wed Aug 22, 2012 11:48 am
Forum: General
Topic: Help needed on Requirement - File Processing
Replies: 13
Views: 5292

Hi wittymy, Its great that you have used routine. However, if you want to do it using sequence activity itself, you can still do it as below- 1. ExecuteCommand1 - Command- echo `date +%Y%m%d%H:%M:%S` 2. ExecuteCommand2 - Command- cat <FileName> | head -1 Trigger in Execute command acivity- We can ch...
by bhasds
Tue Aug 21, 2012 11:17 pm
Forum: General
Topic: Help needed on Requirement - File Processing
Replies: 13
Views: 5292

Hi wittyme,

Yes, you can do that.My logic also not going to abort the job at any cost.If there is no file then it will not hit the job and finish the sequencer successfully.
by bhasds
Tue Aug 21, 2012 12:37 pm
Forum: General
Topic: Help needed on Requirement - File Processing
Replies: 13
Views: 5292

Hi wittyme,

If your DateTimestamp format is YYYYMMDDHH:MM:SS then you can use the below command in execute command-

Code: Select all

cat <FileName> | cut -c  1-8
This will give you only the date and the rest of the thing of my previous post should work as it is.
by bhasds
Tue Aug 21, 2012 12:09 pm
Forum: General
Topic: Help needed on Requirement - File Processing
Replies: 13
Views: 5292

As you said if there is no data then file contains DateTimestamp 20120821 03:44:54. For this, we can do the following in the Job sequence- Execute command - Command- cat <FileName> | nawk -F" " '{print $1}' Trigger in Execute command acivity- a)Link1-This can be mapped to the job to be tri...
by bhasds
Sun Aug 19, 2012 8:27 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Datatype conversions
Replies: 17
Views: 9442

Thanks a lot ArndW.
by bhasds
Sun Aug 19, 2012 3:42 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Datatype conversions
Replies: 17
Views: 9442

Hi ArndW/Chullet, I am sorry for misleading hargun.In the above scenario the code given by me will give erroneous result. :( Can you please tell whether the below modification in your code is fine to get the difference between the two dates in form of month? Neg(DaysSinceFromDate(TimeStampToDate(upd...
by bhasds
Sat Aug 18, 2012 12:48 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Datatype conversions
Replies: 17
Views: 9442

Hi Hargun,


Both the code should give you the same result.So, its your wish which one to use.
by bhasds
Sat Aug 18, 2012 11:14 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Datatype conversions
Replies: 17
Views: 9442

Datatype conversions

Or

If you are using the ArndW's code then divide the output of ArndW's code by 30,assuming the number of days per month is 30 .

Code: Select all

Neg(DaysSinceFromDate(TimeStampToDate(update.IssueDate),TimeStampToDate(update.ExpiryDate)))/30
by bhasds
Sat Aug 18, 2012 10:56 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Datatype conversions
Replies: 17
Views: 9442

Datatype conversions

Hi Hargun,

The below code should work if you have timestamp in source.

Code: Select all

Neg(MonthFromDate(TimestampToDate(update.IssueDate))- MonthFromDate(TimestampToDate(update.ExpiryDate)))
by bhasds
Sat Aug 18, 2012 6:18 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Datatype conversions
Replies: 17
Views: 9442

Hi hargun,

You can try the below code which will calculate the difference between the issue_dt and expiry_dt, and give you the result as an integer.

Code: Select all

Neg(MonthFromDate(issue_dt)- MonthFromDate(expiry_dt))
by bhasds
Wed Aug 01, 2012 8:04 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Reading Data Through Dataset
Replies: 4
Views: 2524

Reading Data Through Dataset

In transform stage @PARTITIONNUM + (@NUMPARTITIONS * (@INROWNUM - 1)) + 1 <2001(in multiple node Configuration file) should work fine.
by bhasds
Sat Jul 21, 2012 1:41 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Basic help
Replies: 2
Views: 1386

generating sequence number

Hi Sachin518,

Sequence Number can be generated in form of row number in Sequential file Stage as well.

sequential file stage--->output--->properties-->options-->RowNumberColumn.