Converting/Adding 8 character into a 12 character string

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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This is all pretty simple string manipulation since you aren't working with variable length strings. Try doing it in 2 steps, one to right-align the numeric, then the second to do the string insertions

1. In.Col[1,1]:FMT(In.Col,"11'0'R")
2. do you explicit positional changes.
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Left(In.Col,1) : Left(In.COLUMN1,3) : Left(In.COLUMN2,1) : Left(In.COLUMN3,1) : Right(In.Col,Len(In.Col)-1)
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