Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9129

Transformation file padding

$
0
0

Hello Experts

 

In the 'Mapping Section' of a Transformation file, is it possible to combine the Column Index function with the PAD function used for padding imported fields?

 

Through the Transformation File, a string of text is derived by concatenating several columns, see example below:

 

DATASRC=*COL(23)+*COL(5)+*COL(9)+*COL(3)+*COL(11)+*COL(17)

This produces a string of text such as:

99W8CE01114099999999

 

Each column is shown using the pipe delimiter:

99|W|8|CE01|1|14099999999

 

Some fields are variable in length.  This can produce a string of text that may be identical to another but in fact has a very different meaning and should be handled differently by the Conversion File.

 

Using the same example, those Columns I have highlighted in bold are variable length and need to be padded (to the left) so that they become a fixed length 2 digit field.

 

DATASRC=*COL(23)+*COL(5)+*COL(9)+*COL(3)+*COL(11)+*COL(17)

 

Ideally this would produce a string of text like this:

99WP8EM04P114099999999

 

I have used pipes to separate the constituent parts:

99|W|P8|EM04|P1|14099999999

 

The letter 'P' is used to Pad the field.

 

I have tried the following formula but the Transformation File will not validate.

 

DATASRC=*COL(23)+COL+*PAD(COL(9),2,L,P)+*COL(3)+*PAD(COL(11),2,L,P)+*COL(17)

 

Any suggestions would be much appreciated.

 

Thanks


Viewing all articles
Browse latest Browse all 9129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>