Frequency of a record in a sequential file
Posted: Mon Jul 18, 2005 4:38 am
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
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