Separating the Columns based on the ColumnSize

Hi Gurus,

i had a Table with the columns

col1            Decimal(3),
col2            Decimal(2),
col3            String(1),
col4_blank1  String(2),
col5_blank2  String(10),
col6            String(3);


the Data(Records) of the Table in flat file is

89522D            085NOVOLIN BRAND                 888888ALL OTHER

i want to display the output by separating the columns with ~ based on the column size is 3 of col1 Decimal(3) and col2 having the size 2...

895~22~D  ~         ~085~NOVOLIN~ BRAND

Thanks in Advance

You can use the regular string functions for that, such as MID(), SUBSTR(), LEFT() etc, and the string concatenation, which is in most cases the ampersand (&).

set colsep to ~