Page 1 of 1

Sequential file

Posted: Thu Jan 31, 2008 10:23 pm
by Ush
Hi,

I have a file with following data:

Col1 col2
132Asha,12
133Nimi,13


in the above 132 is empno of width 3.Rest are Empname.
in the destination file it should go as
col1 col2 col3
132 Asha 12
133 Nimi 13
Please let me know if we have options to get the above requirement.
In other tools we have options like first column fixed width.Rest variable length with comma delimiter.

Thanks

Posted: Thu Jan 31, 2008 10:31 pm
by chulett
If your Empno is a fixed width, why not read your file with comma delimiters and then split your first field? Substring out the first three characters, the rest goes to Empname.

Posted: Thu Jan 31, 2008 11:05 pm
by MOHAMMAD.ISSAQ
You can do like this:-

Output.Col1=Input.Col1[1,3]
Output.Col2=Input.Col1[4,len(Col1)]
Output.Col3=Input.Col2[/quote][/list]

Posted: Thu Jan 31, 2008 11:08 pm
by MOHAMMAD.ISSAQ
Sorry the previous reply had some junk characters.

You can do like this:-

Output.Col1=Input.Col1[1,3]
Output.Col2=Input.Col1[4,len(Col1)]
Output.Col3=Input.Col2

Posted: Fri Feb 01, 2008 8:02 am
by chulett
So just edit it, no need to post again.