Is there any utility that can be used in JCL to find the count of records with respect to a particular field in that file.
It's not clear from your description exactly what you want. Show an example of your input records (relevant fields only) and the expected output records. Give the starting position, length and format of the relevant fields. Give the RECFM and LRECL of the input file.
Count of records with 5 = 3
Count of records with 6 = 2
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Well, that's what I meant about giving the correct information in the first post.
The ICETOOL method would work for that number of records as I showed it.
You showed the output as having 1 digit, so I gave you 2 digits for the DFSORT method. If you had showed me 8 digits, I would given you 9 digits. For 9 digits you can use EDIT=(IIIIIIIIT) or M10,LENGTH=9. For 10 digits, you can use EDIT=(IIIIIIIIIT) or M10,LENGTH=10. Adjust accordingly.
In the above e.g I need to generate one more count.. i.e..
For the number 5 there are 3 records but the third field is 2000 only for 2 records. I just need to count that, and also The records having values other than 2000, thus giving 5 & 2000 - 2 records, other than 2000 1 record.
For the other number 6. Having 6 and 2000 - 1 record, other than 2000 - 1 record..
Please let me know how to generate the O/P in teh desired format as i have given in the above E.G.
Also one more thing.. Am having the O/P for few hundred pages and I need a line '-------------' at the end of the first page alone. Please let me know if this is possible.. I tried using headers but its giving lines in all the pages.
Count of records with 5 = 2 1
Count of records with 6 = 1 1
Am having the O/P for few hundred pages and I need a line '-------------' at the end of the first page alone. I tried using headers but its giving lines in all the pages.
Huh? Since you only get one line per value (e.g. '5') in position 30 - how do you get hundreds of pages from that?
HEADER2 prints lines at the top of the page. How are you using it to print a line at the end of the page? TRAILER2 prints lines at the end of the page. But as you say, HEADER2/TRAILER2 prints lines on every page.
You'd have to explain more about what you're trying to do and what your output looks like before I could try to help you with this requirement.
Yup.. What i gave was just an example.. I have some hundreds of such values for which the count is to be determined..
Actually Am doing this operation for two files in two steps.. Which will be merged later to form a single report.. So am just giving the line in the header of the second report so that it ll become a partition for the two reports...
NO OF EMP RECORDS WITH IPLAN IND 7 = 1215355
NO OF DEP RECORDS WITH IPLAN IND 7 = 1675400
NO OF EMP RECORDS WITH IPLAN IND 6 = 191698
NO OF DEP RECORDS WITH IPLAN IND 6 = 373431
NO OF EMP RECORDS WITH IPLAN IND 5 = 1696575
NO OF DEP RECORDS WITH IPLAN IND 5 = 2411017
NO OF DEP RECORDS FOR CUSTOMER 0002284 = 7200
NO OF EMP RECORDS FOR CUSTOMER 0002284 = 3519
NO OF DEP RECORDS FOR CUSTOMER 0006472 = 1668
NO OF EMP RECORDS FOR CUSTOMER 0006472 = 2096
This is the part where i need teh line..
Is there any other way by which i can enter a line...?