Use a simple if then else statement in stage variable to see if its numeric or not.
Use another if then else statement in the derivation to check on the value of stage variable and putting proper values for particular columns.
Search found 6797 matches
- Tue May 15, 2007 9:39 am
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: can we use if..then...else conditions in a stage variable
- Replies: 13
- Views: 3413
- Tue May 15, 2007 9:21 am
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: Datastage 8.0
- Replies: 2
- Views: 827
- Tue May 15, 2007 9:20 am
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: can we use if..then...else conditions in a stage variable
- Replies: 13
- Views: 3413
- Tue May 15, 2007 9:19 am
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: time stamp conversion
- Replies: 19
- Views: 7432
Ok, then change the FixDay stage variable's derivation to the following:
The StringToTimestamp() derivation will remain the same. Read the date as varchar.
Code: Select all
If in.Col[5,1] = " " then in.Col[1,3]:" 0":in.Col[6,21] else in.Col
The StringToTimestamp() derivation will remain the same. Read the date as varchar.
- Tue May 15, 2007 9:13 am
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: Deleting records from Sybase IQ DB.
- Replies: 4
- Views: 3229
- Tue May 15, 2007 8:44 am
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: time stamp conversion
- Replies: 19
- Views: 7432
- Tue May 15, 2007 8:33 am
- Forum: General
- Topic: SQLServer has NChar but Datastage does not have NLS
- Replies: 1
- Views: 1174
- Tue May 15, 2007 8:21 am
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: unlock routine
- Replies: 1
- Views: 1000
- Tue May 15, 2007 8:20 am
- Forum: General
- Topic: Processing files in a directory
- Replies: 44
- Views: 12719
- Tue May 15, 2007 8:13 am
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: Executing Unix script from routine...
- Replies: 3
- Views: 1512
What is Arg in your routine? Is it really Arg or Arg1.
Plus you need a space between ksh +x and your argument.
Plus you need a space between ksh +x and your argument.
Code: Select all
Command="ksh +x ":Arg:"/InputFilesCount.sh"- Tue May 15, 2007 8:10 am
- Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- Topic: Conditional job abort
- Replies: 5
- Views: 2793
- Tue May 15, 2007 8:06 am
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: Writing in to a sequential file trhru routine
- Replies: 22
- Views: 8125
This is'nt the entire code is it? WHere are you opening the file (OPENSEQ) for writing. Plus, I dont think you need a WEOFSEQ. All you need to do is OPENSEQ 'myfilename' to FILE ELSE ABORT LOOP WRITESEQ ..... END LOOP CLOSESEQ FILE This is just to give you a general idea. Its not complete code. Does...
- Tue May 15, 2007 7:57 am
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: Calling user-defined Oracle function
- Replies: 4
- Views: 963
- Mon May 14, 2007 1:29 pm
- Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
- Topic: @INROWNUM
- Replies: 2
- Views: 1040
- Mon May 14, 2007 12:23 pm
- Forum: General
- Topic: Processing files in a directory
- Replies: 44
- Views: 12719