Hi,
I have a file with variable length of records.Maximum length is 2000 bytes.
I want to convert the file to fixed width. ie., I want to convert all the records to equal length of 2000 bytes by adding spaces.
I have shell script for the above conversion, however, the converted file occupies more momery in DS server. So I'm looking for better option that, whether can we do it n DS itself?
Could you please help me on this?
Regards,
converting variable length to fixed length file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 75
- Joined: Mon Jul 12, 2010 4:11 am
- Location: Chennai
Re: converting variable length to fixed length file
Read it in with varchar fields then write back out (to a new name) with CHAR fields. Make sure your PAD character is set to a space: 0x20.
I'm curious why you are doing this. Also curious what this might mean:
I'm curious why you are doing this. Also curious what this might mean:
If you mean the file is larger, well... of course it is.ajithaselvan wrote:I have shell script for the above conversion, however, the converted file occupies more momery in DS server.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: