Page 1 of 1

Frequency of a record in a sequential file

Posted: Mon Jul 18, 2005 4:38 am
by chitrangadsingh
Hi,

I have to read a sequential file with some fields and the output should contain the frequency of occurence of values in one of the fields.
For eg. lets assume file has 3 fields A,B and C.
the sample data is

A B C
e t g
e w p
r u g
s t p

Now the output file should have :
C Count
g 2
p 2
How this can be achieved in PX without any sql (since the input is a sequential file)

Thanx,
Chits

Posted: Mon Jul 18, 2005 4:49 am
by hexa
Welcome ABROAD

Use Aggregator Stage to achive.

refer doc for more information

hexa

Posted: Mon Jul 18, 2005 5:01 am
by elavenil
As hexa mentioned, group the required column in AGGR and use the count function to achieve this.

Take care of Sort the input data and partitioning.

HTWH.

Regards
Saravanan

Posted: Mon Jul 18, 2005 5:16 am
by chitrangadsingh
Hey thanx for the warm welcome and the soln.

Any idea regd any docs freely available on net for Datastage??

(i'm kinda on leave and thus dont have access to any docs)

Posted: Mon Jul 18, 2005 2:42 pm
by ray.wurlod
Currently there are no manuals available for download.

This may change now that IBM has acquired the products, as their model includes publishing manuals on a web site.

But not yet.