regarding date conversion into dd/mm/yyyy

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
asoka_dwh
Participant
Posts: 11
Joined: Mon Oct 24, 2005 11:37 pm
Contact:

regarding date conversion into dd/mm/yyyy

Post by asoka_dwh »

hello friends this ashok,


actually requiremnt in the target field id dd/mm/yyyy , while the soucre filke has same format dd/mm/yyyy.but job gets succeded,no data in target

any one can give me a solution in date formats


regards
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Welcome aboard. What is your target stage? Is it ODBC, OCI, etc? What database and version. Can you tell us the datatype of the column in question? "No data in target" means no rows, or empty columns? Are there any messages in the job log?
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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hello Asoka,

this is a common type of transformation; but before anyone can suggest an answer you must tell us what the target database is going to be. You can also look up the documentation for the ICONV and OCONV functions and the "D" conversion code and also use the search facility shown above to get some preliminary answers.
asoka_dwh
Participant
Posts: 11
Joined: Mon Oct 24, 2005 11:37 pm
Contact:

i am using sequential file as source and odbc stage as targt

Post by asoka_dwh »

hello friends,

I am using sequential file as soucre, odbc as target and target database is oracle 9i.

sample of source file as fallows

516022.00000|party instrution |06/02/2002| 50096| 8905.00|vijay automobile |06/02/2002
518756.00000|party's request |25/01/2002| 50474| 45832.50|landmark leather |23/01/2002
513127.00000|PARTY'S REQUEST |16/01/2002| 51441| 1760.00|SURSANGAM |28/02/1900
468820.00000|AS PER PARTY'S REQUE|08/01/2002| 50096| 13503.00|JAGANNATH K B |22/10/2001
459425.00000|misplace |29/12/2001| 51376| 0.00||28/02/1900
459424.00000|misplace |29/12/2001| 51376| 0.00||28/02/1900
459423.00000|misplace |29/12/2001| 51376| 0.00||28/02/1900
459422.00000|misplace |29/12/2001| 51376| 0.00||28/02/1900
459421.00000|misplace |29/12/2001| 51376| 0.00||28/02/1900
459420.00000|misplace |29/12/2001| 51376| 0.00||28/02/1900
459419.00000|misplace |29/12/2001| 51376| 0.00||28/02/1900
459418.00000|misplace |29/12/2001| 51376| 0.00||28/02/1900
514963.00000||29/12/2001| 51441| 945.00||28/02/1900
27365.00000||**/**/****| 0| 0.00||**/**/****
275365.00000|refer to drawer |**/**/****| 8239| 1000.00|M/S MAXCOM |**/**/****
202480.00000|chq book lost |21/10/2000| 8160| 0.00||28/02/1900
202479.00000|chq book lost |21/10/2000| 8160| 0.00||28/02/1900
202478.00000|chq book lost |21/10/2000| 8160| 0.00||28/02/1900
202477.00000|chq book lost |21/10/2000| 8160| 0.00||28/02/1900

(dos style file,it has seven fileds )


source fildes target fields (datatypes)

filed1 chqueno Number(15)
filed2 stoppayreason varchar2(30)
filed3 stoppaydate DATE
filed4 accountno NUMBER(6)
filed5 Ammount Number(18,2)

source fileds 6,7 are excluded


while filed3 in source table is dd/mm/yyyy format and the same i need in the target date filed.

i know that there are some valuess **/**/**** in sorce fileds, could i "replace by some dummy dates example where ever **/**/**** comes then i have to replace with 01/01/2010 "

is this posible in datastage

regards
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Yes it is possible.

Sounds to me you lack basic training in DS or had one to long ago without using it :(.

It would be better if your manager got some DS training for you or some mentoring by a skilled person.
This is only My Humble Opinion.
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,

First try to convert into internal date format Using iconv function.

regards
kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's been some testimonial!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
asoka_dwh
Participant
Posts: 11
Joined: Mon Oct 24, 2005 11:37 pm
Contact:

regarding date conversion into dd/mm/yyyy

Post by asoka_dwh »

Hello friend,


I had done it using oracle stage, by using after option in that stage and converted it ,by using to_date function

regards

roy wrote:Yes it is possible.

Sounds to me you lack basic training in DS or had one to long ago without using it :(.

It would be better if your manager got some DS training for you or some mentoring by a skilled person.
This is only My Humble Opinion.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
We ment you do a:
DB > xfm > target
job design where you use the Iconv/Oconv conversion in the xfm (Transformer stage) in the column derivations.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply