hcclnoodles
IS-IT--Management
Hi there, Ive got a feeling this is quite complex but I have a Comma delimited file which is being transfered up to a mainframe and I have to get every column lining up , I need to add in characters to line it up (but different characters and in different positions based on what field/column it is.
For example here is my original file ......
12345,abcdef,123456789,abcd
123456,abcdef,1234567,abcd
and here is what i need doing ............
1) IF data in field 1 is less than 6 characters long then put enough spaces after the last character to make it up to 6
2) Fields 2 and 4 are fixed at 7 characters and will always be populated by 7 character data
3) IF data in Field 3 is less than 10 characters then place leading zero's in front until 10 characters long
So the end result will look like this...
12345 ,abcdef,0123456789,abcd
123456,abcdef,0001234567,abcd
all lined up lovely for processing
If anybody could give me a few tips on what i would need to do to get started on this and what programs i need to use etc then that would be fantastic
cheers
Gary
For example here is my original file ......
12345,abcdef,123456789,abcd
123456,abcdef,1234567,abcd
and here is what i need doing ............
1) IF data in field 1 is less than 6 characters long then put enough spaces after the last character to make it up to 6
2) Fields 2 and 4 are fixed at 7 characters and will always be populated by 7 character data
3) IF data in Field 3 is less than 10 characters then place leading zero's in front until 10 characters long
So the end result will look like this...
12345 ,abcdef,0123456789,abcd
123456,abcdef,0001234567,abcd
all lined up lovely for processing
If anybody could give me a few tips on what i would need to do to get started on this and what programs i need to use etc then that would be fantastic
cheers
Gary