View previous topic :: View next topic
|
Author |
Message |
arafath85
New User
Joined: 10 Nov 2008 Posts: 1 Location: Hyderabad
|
|
|
|
How to count a number of records in JCL with specified conditions and the result should be display in form of report kind?
Ex; There were 3 differtent types of records like A,B,C in XXX.YYY dataset and i want to count number of A,B,C type records with JCL itself? |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
A program ( or utility which is also a program ) will do that NOT A JCL.
What kind of program do you want to use? |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
arafath85,
Welcome to the forums. You can do this using any of the SORT utilities available in your shop. But you need to mention more specific details about the rules for extracting records and the below info.
Input RECFM/LRECL
Output RECFM/LRECL
Starting position,length and format of relevant fields.
A few sample input records showing relevant fields and the expected output out of it.
PS. While posting code, please use the "Code" tag provided here. "Preview" it to verify your post displays correctly before doing "Submit". |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
and i want to count number of A,B,C type records with JCL itself?
|
You'll be waiting a long time to do this -- JCL does one thing and only one thing -- execute programs (which include utilities). JCL does nothing else, especially not counting stuff. A program JCL executes may count stuff but the JCL doesn't. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Yasar,
You can do what you want with DFSORT. Exactly how you would do it depends on exactly what your input records look like and exactly what you want for the output report. But if you just need something simple, you can use a DFSORT/ICETOOL job like this:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
A
A
A
B
C
C
C
C
/*
//RPT DD SYSOUT=*
//TOOLIN DD *
OCCUR FROM(IN) LIST(RPT) ON(1,1,CH) ON(VALCNT) BLANK
/*
|
RPT would have:
Code: |
(1,1,CH) VALUE COUNT
A 3
B 1
C 4
|
For more information on the OCCUR operator of DFSORT's ICETOOL, see:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.9?DT=20060615185603 |
|
Back to top |
|
|
|