Posted: Fri Jan 20, 2006 12:01 am Post subject: Count of excluded fields
Hi,
I have a file that is to be sorted on a certain criteria. Also, I've to create another file from this by excluding the records on a different criteria.
Now, I need to know no. of records I've processed(Total no. of records), No. of records selected or discarded and I want to pass these numbers to a program for processing.
Can anybody suggest a way to achieve this? If we get the counts into a file, that would be great.
Posted: Fri Jan 20, 2006 4:46 am Post subject: Another problem
Thanks Phantom for prompt response!!
The input file LRECL is 220 and it has 2 fields starting at 97 and 81 and they are defined as X(10) and X(06) respectively(let's say field 'A' and field 'B'). The condition is that I've to include only those records which have value of field A ='CURRLDGR ' and value of field B should be any of 22101,21110,21159,21150,21221.
Also, I need a count of either - Selected records or excluded records.
While trying out I came to know that this can be achieved by using COUNT in TRAILER1 in OUTFIL statement. Please see below -
SORT FIELDS=(81,6,CH,A)
INCLUDE COND=(97,10,CH,EQ,C'CURRLDGR ',AND,
81,5,CH,EQ,C'22101,21110,21159,21150,21221'),FORMAT=SS
OUTFIL TRAILER1=(1:'SELECTED:',10:COUNT15)
This works fine when I use it for only single value of field B. Even it gives the count of selected number of records.
Area of concern/Actual Problem: But when I give condition as in above control card(4-5 values), the records are selected having field A='CURRLDGR ' but the field B having only = '22101'(it is because it appears first in that group. I replaced it with other and got similar result).
Can anybody throw light on this and help me pointing out the mistake in control card?
Thanks in advance! _________________ Regards,
Mangsk
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Fri Jan 20, 2006 5:01 am Post subject:
Mangsk,
Quote:
But when I give condition as in above control card(4-5 values), the records are selected having field A='CURRLDGR ' but the field B having only = '22101'(it is because it appears first in that group
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum