Header and Trailer for FilePattern

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mcs@rajesh
Participant
Posts: 46
Joined: Mon Sep 24, 2007 12:37 am
Location: INDIA

Header and Trailer for FilePattern

Post 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
Rubu
Premium Member
Premium Member
Posts: 82
Joined: Sun Feb 27, 2005 9:09 pm
Location: Bangalore

Post 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
Regards
Palas
mcs@rajesh
Participant
Posts: 46
Joined: Mon Sep 24, 2007 12:37 am
Location: INDIA

Post 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
Novak
Participant
Posts: 97
Joined: Mon May 21, 2007 10:08 pm
Location: Australia

Post 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
mcs@rajesh
Participant
Posts: 46
Joined: Mon Sep 24, 2007 12:37 am
Location: INDIA

Post 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.
Post Reply