Changing format

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
mtechnocrat
Participant
Posts: 38
Joined: Sat Feb 28, 2004 12:11 pm

Changing format

Post by mtechnocrat »

Hi
I want to change the format from "abcdefghij" to "abcd.ef.ghij"

how to solve this.....????


Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not exactly a lot of information to work from. :?

Do you always need to insert a period after the fourth and sixth character in this particular 10 character string? Then simply substring it and concatenate it back together with them in place:

Code: Select all

YourField[1,4]:".":YourField[5,2]:".":YourField[7,4]
If that's not what you meant or needed, please feel free to post back with more information! :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

An alternative approach is to use the Fmt() function with a mask. for example

Code: Select all

Fmt(TheString,"L####.##.####")
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