any function to right justify the values in a column
Moderators: chulett, rschirm, roy
any function to right justify the values in a column
i am new to datastage.currently i am working on datastage 7.5 PXjobs. I want to right justify the data that is going to target in the transformer.is there any function to do it.
Sree
From my experience (which is simple and straight-forward), try using stage variables in the way mentioned below.
TrimStr <- Trim(YourLinkVariable)
LengthStr <- Len(TrimStr)
SpaceStr <- Space(50 - LengthStr)
// where 50 is the length of the field. Change if different
YourOutputColumn <- SpaceStr : TrimStr
It worked for me and so I believe it will work for you too.
I tried using -ve value in PadString length but in vain. So if anyone has better idea, please let me know.
TrimStr <- Trim(YourLinkVariable)
LengthStr <- Len(TrimStr)
SpaceStr <- Space(50 - LengthStr)
// where 50 is the length of the field. Change if different
YourOutputColumn <- SpaceStr : TrimStr
It worked for me and so I believe it will work for you too.
I tried using -ve value in PadString length but in vain. So if anyone has better idea, please let me know.
-
- Participant
- Posts: 36
- Joined: Wed Feb 16, 2005 5:20 pm
- Location: IL
Hi NewPXUser
Hi
I am very new so dont think wrong is this available function TrimStr i think its just
Trim(String) not TrimStr.
Please let me know if i am wrong.
I will correct for myself
I am very new so dont think wrong is this available function TrimStr i think its just
Trim(String) not TrimStr.
Please let me know if i am wrong.
I will correct for myself
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom