convertiong iconv& oconv functions to px.

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
chvenkat.v
Participant
Posts: 94
Joined: Fri Dec 14, 2007 3:22 am

convertiong iconv& oconv functions to px.

Post by chvenkat.v »

hi,

pls give any help for converting iconv&oconv functions to px.

1) in server i have

Oconv (Iconv (Txfm_input.PMMDATETIME[1,6],'D/DMY'),'D-YMD[4,2,2]')

i need to convert this to px.

2) Oconv ((toTrans.CALLG_PARTY_NO),"MCN") to PX.

3) fmt() function tell me use in server jobs

thnks
venkat
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

StringToDate and DateToSting would to most of all tricks.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

1) This depends upon your input data type, if it is string then you need DateToString() with the right output mask. If it is date, then no function is required, just change the date representation mask in your output stage by going into the columns tab, right click on your date column and go to extended properties.

2)You can use a CONVERT() function that converts all non numeric characters to an empty space.

3)It depends what you are trying to achieve with the FMT() function.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chvenkat.v
Participant
Posts: 94
Joined: Fri Dec 14, 2007 3:22 am

thnks to kumar and dsguru

Post by chvenkat.v »

my problem is input field i.e. PMMDATETIME as a timestampe datatype. i need to convert this to store date in one output column and hrs (hh) to other output column.

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

Post by ray.wurlod »

Then (a) stop thinking like a server developer in your Iconv/Oconv rut, (b) explore all the date/time conversion functions that are available (Appendix A of Parallel Job Developer's Guide would be a good place to start) and (c) be prepared to experiment.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply