Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to read a file with variable record lengths?

Status
Not open for further replies.

punu

Programmer
Sep 12, 2003
2
US
Hi,

Can anybody tell me how to read a file with variable record lengths using datastage?
If we can where do I have to set the properties?

Thanks
kavitha.
 
What sort of file are you trying to read? Have you tried using a sequential file stage and specifying your field delimiter?

Just an idea, although i'd need more details to make a better suggestion

J
 
Hi ,

I have a flat file which has
: two types of records(I mean they have variable record lengths)

so, how should i go about it,
Can somebody explain me little bit technically what exactly i have to do?

Thanks
punu.


 
2 ways that i look at your query.

1. If the record length's vary, because of column width, and the flat file is a fixed width one,
then set the Max. of the column width in the sequential stage -> Properties -> Outputs -> Columns -> length.

2. If there is a delimiter, then update the columns field according to the text file columns, and set the delimiter under sequential stage -> Properties -> Outputs -> format -> delimiter with the delimiter in the text file. In case it is tab delimited, then put in 009 in the delimiter text box.
Note here : See that the fixed width checkbox is not checked.


I hope this helps, otherwise, post in your exact question along with example.

Cheers.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top