Hi all;
I am trying to read the source file in which some records are having the record length of 126 and some records are having record length of 114. i am able to read the data of length 126 only. but i want both 126&114 field length data to be read. one column in the source file has 26 length.but some records are coming as 26 and some rcords are coming 14.how i can read this file.
Thanks in advance;
Shyam.
cannot able to read the records of variable lenghts
Moderators: chulett, rschirm, roy
What source are you reading from? A sequential file?
It sounds as if you have declared the fields to be fixed length but they are of variable lengths so you would need to change your file metadata. Does this file have column delimiters? If it does then the change to a varying length column should be a simple matter. If it doesn't have delimiters then you may be better served using something like CFF or even your own "parsing" within DataStage. This depends upon how your source is actually set up and it would be best if you could post an example or additional description of your layout.
It sounds as if you have declared the fields to be fixed length but they are of variable lengths so you would need to change your file metadata. Does this file have column delimiters? If it does then the change to a varying length column should be a simple matter. If it doesn't have delimiters then you may be better served using something like CFF or even your own "parsing" within DataStage. This depends upon how your source is actually set up and it would be best if you could post an example or additional description of your layout.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Do you have 2 different record layouts in your input file? If so, then the Complex Flat File stage may be your best bet. I believe it allows you to define multiple record layouts.
I'll let someone who has actually used this stage pipe in here, just in case I got it wrong... (we need to do this ourselves, just have not had time to play around with it).
Brad.
I'll let someone who has actually used this stage pipe in here, just in case I got it wrong... (we need to do this ourselves, just have not had time to play around with it).
Brad.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: