completing a result

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
incognico
Participant
Posts: 23
Joined: Thu Sep 07, 2006 3:07 am

completing a result

Post by incognico »

Hello !

I have a question.
a.JO_NUM = "RI"
i have this in sql server
a.JO_NUM+replicate(space(1),6-LEN(a.JO_NUM))
result : "RI "

with datastage i try this:
Fmt(Extraction.JO_Num, "6-Len(Extraction.JO_Num)'Space(1)'U")

But the result is not good.
result "RI"

if you have a idea ..... thanks.

Nick
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

Try

Code: Select all

Fmt(Extraction.JO_Num,6-Len(Extraction.JO_Num) : ' L') 
Success consists of getting up just one more time than you fall.
incognico
Participant
Posts: 23
Joined: Thu Sep 07, 2006 3:07 am

Post by incognico »

argh...

No the result is "RI " with 2 blank and not "RI " with 4 blank (6-len=>4)
:?
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I would use spaces() or str(). Should do what replicate used to do.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Seems too complex to me. I'd use:

Code: Select all

Fmt(a.JO_NUM, "L#6") 
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
incognico
Participant
Posts: 23
Joined: Thu Sep 07, 2006 3:07 am

Post by incognico »

Thank's Ray !
It's OK. :D
Post Reply