Page 1 of 1
Header and Trailer for FilePattern
Posted: Wed Aug 27, 2008 11:56 pm
by mcs@rajesh
Hi all
I have a Problem with the Trailer Validation whenever i am extracting the data from multiple files using filepattern.
I am not able to do Validation for trailer because i don't know what would be the values .
ex
source file 1:
Header : H,20080910,TRED
Detailed :D,
Trailer:T,25
SourceFile2:
Header : H,20080910,TRED
Detailed :D,
Trailer:T,29
Hope am clear
Posted: Thu Aug 28, 2008 12:34 am
by Rubu
Hi,
I had a problem with a header\trailer in the past few days and might be able to help out, but am not quite sure what exactly is your problem there.
Regards,
Novak
Posted: Thu Aug 28, 2008 6:50 am
by mcs@rajesh
Rubu wrote:Hi,
I had a problem with a header\trailer in the past few days and might be able to help out, but am not quite sure what exactly is your problem there.
Regards,
Novak
Hi Rubu
Thanks for your Reply
Let me brief out my problem
Normally i validate a single file at a time which does'nt gave any problem but whenever i get more than a single file i really cannot apply my logic which i did before. I have to Validate all the files at the same time
The logic for Trailer Validation is given below
Trailer_value+2=Row_count
2 is nothing but Header and Trailer Count
Trailer_value is the Trailer Field and Row_count is the addittional column from column_gen to do this Validation
Now if i get more than a single file i does'nt howmany files i am reading and i cannot apply the function which i mentioned above
Let me Know if you need further more clarification.
Thanks
Rajesh
Posted: Thu Aug 28, 2008 11:11 pm
by Novak
Hi Rajesh,
Not quite the problem I had in mind. Yours sound much more complicated. And to be frank, I still don't understand it...
Are you saying that you need to keep a running total of all footer counts of your source files?
Regards,
Novak
Posted: Thu Aug 28, 2008 11:37 pm
by mcs@rajesh
Novak wrote:Hi Rajesh,
Not quite the problem I had in mind. Yours sound much more complicated. And to be frank, I still don't understand it...
Are you saying that you need to keep a running total of all footer counts of your source files?
Regards,
Novak
Hi Novak,
Well let me tell you what my job flow is after the Source file i have a Col
Gen to generate an Numeric Column and the Value starts from 1 and that
column is compared in that function which i posted earlier and every time
the last value of that column is greater than the footer
value by 2( if the footer value is 20 then it is 22) so i added 2 with the
footer value this is how i validate but if i read more than single file i
couldn't follow this logic.