If the input record AAAAAAAAA occurs 3 times, then AAAAAAAAA record should be written in one output file,
VVVVVVVVV output record occurs 2 times, as well as GGGGGGGG record occurs 2 times. Then VVVVVVVVV and GGGGGGGG records must be written to another file.
Similarly, the HHHHHHHHH record must be written to a separate file.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Quote:
If the input record AAAAAAAAA occurs 3 times, then AAAAAAAAA record should be written in one output file,
VVVVVVVVV output record occurs 2 times, as well as GGGGGGGG record occurs 2 times. Then VVVVVVVVV and GGGGGGGG records must be written to another file.
Similarly, the HHHHHHHHH record must be written to a separate file.
Are you saying you want to create a separate file for each unique "count" of the key value and all of the records having that "count" go into the same file?
If there are 900 different "counts" should 900 separate output files be created?
If you explain what you are trying to accomplish, we may be able to offer suggestions.
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
krisprems,
If I understood the original post properly, Nayanish wants to write all the records depending on the occurences in one file.
Let me put this way, AAAAAAAAA record occured thrice. So anyother record set (eg ZZZZZZZZZ etc...) which has repeated 3 times should go with AAAAAAAAA in one file (say this file OCCUR3).
Whereas VVVVVVVVV & GGGGGGGGG record occured twice. So he wanted to write these records in one file (say this as OCCUR2) etc.....
The record HHHHHHHH should go to another file (say OCCUR1).
This DFSORT/ICETOOL JCL, writes the records having the key with one
occurance into one file, and 2 occurance in to 2nf file, and 3 occurance in to third file.
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
Let's say you have the understood the requirement. . .
What happens when there is a count other than 1, 2, or 3? As i asked earlier, what happens if there are 900 (ok, that's too many, so let's say 300) different counts? That is too many dd statements for one step.
I'd be interested in how this output wouild be used and maybe we can offer more alternatives.
I have tried the first code for getting the duplicate records count but records are coming from second column.
=COLS> ----+----1----+----2----+----3----+----4
****** ***************************** Top of Dat
000001 1(1,10,CH) VALUE COUNT
000002 ABCDFFF 000000000000007
000003 KUMAR 000000000000006
000004 AAAAAAA 000000000000007
Please suggest that how to get the records from first column and in first line char 1 will not come with (1,10,CH).
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
You have replied to a topic that has been inactive for over 2 years.
You have also not very clearly described what you want to do. Describe the "rules" for getting from your input to the desired output.
Please post the output you want from the sample input. If a more representative sample is needed, add some more data to show the possible situations. Once the input sample has been built, show the output you want from the sample input.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
spath12,
If I understand you correctly, you do not want the ANSI carriage control character that DFSORT's OCCUR usually puts in the output of the report (e.g' 1' in column 1 for page eject).
You can eliminate that character by using the NOCC operand, e.g.
OCCUR NOCC FROM(...
For complete details on the OCCUR operator of DFSORT's ICETOOL, see:
Yes, you are correct and I wanted to remove the ANCI carriage control character. I was not aware of this feature of DFSORT so getting the 1 in column 1 for page eject.