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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Tree with Same Length Header and Data Recs

Status
Not open for further replies.

ksstupp

Programmer
Jan 27, 2005
4
0
0
US
I am having trouble creating a type tree to handle the situation below.

I am reading a data file that can have multipe data sets in it. Each data set consists of 1 header record and 0 or more data records. The header records can be distinguised by a constant value in the first 3 positions, however the data records do not contain a consistent identifier. Both header and data records have the same record length.

When I try to process a data file with more than one data set (1 hdr and multipe dtl recs), my map fails because it can not distinquish the second header record from a data record of the first set.

I must be missing something obvious.

Any help is appreciated.
Kevin
 
Is there anything that shows the end of the data set or sets?
Have you made the three constants an identifier? Are you sure these three characters will not appear in the data?

What version are you using?

You should send the tree and sample data to Ascential Support for this.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
There isn't anything that shows the end of a data set, but I can identify a new one by the 3 constant characters in each header rec.

We are running version 6.5.

I went ahead and submitted the problem to the Ascential developers website.

Thanks for your response, Kevin
 
Have you made the three constants an identifier? Are you sure these three characters will not appear in the data?

I ask 3 questions and you answer one. I suggest sending to Support and you send it to developers site which is promarily for the DS product, not DS TX.

If you can't identify the end of the data, when is the engine supposed to start looking for the identifier? In order to be processed, the data does need structure sufficient to define it. A line is defined by two points, a start and an end. Same with data, all we have now is a start. Is there no <cf><lf> between rows? anything?



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
BocaBurger,

Thanks for following up. Sorry, for not answering all of your questions.

I'll try to do a better job this time.

Is there anything that shows the end of the data set or sets? There is a <cr><lf> at the end of each record, however the data set will consist of at least one header record and possibly multiple data records.

Have you made the three constants an identifier? I did try this, however I still received an error when the second header for the second data set was processed. It still thought that a data record was being processed.

Are you sure these three characters will not appear in the data? I'm confident that these characters will not occur in the data.

I can email you a sample of the data file and my type tree if you like.

Also, I went ahead and submitted the problem to Ascential Support.

Thanks, Kevin
 
Well, if there is a <cr><lf> at the end of every record, define this as a terminator. That should fix the problem.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
BocaBurger,

Mercator support helped me resolve the problem.

I needed to define an identifier on both my data record and dataset type tree. The identifier on the data record was for a value not = to the constant found on my header.

Kevin
 
I know, I sit next to the two people who worked on this. :)



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top