Page 1 of 1

datasets record count

PostPosted: Fri Jul 09, 2010 1:22 am
by jawaharsmg
Hi,

I have a requirement where I have to read 10 datasets and report only the counts in each in a common report.

The output will list the below details

DSN1 - 10 records
DSN2 - 20 records
DSN3 - 30 records
DSN4 - 40 records
DSN5 - 50 records
DSN6 - 60 records
DSN7 - 70 records
DSN8 - 80 records

Please advise if there is a way out in sort, else I plan to write a program to do so.

regards
Jawahar Hussain

Re: datasets record count

PostPosted: Fri Jul 09, 2010 2:03 am
by Frank Yaeger
You could use a DFSORT/ICETOOL job something like the following:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD DSN=...  input file1
//IN2 DD DSN=...  input file2
//IN3 DD DSN=...  input file3
...
//RPT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(RPT) USING(CTL1)
COPY FROM(IN2) TO(RPT) USING(CTL2)
COPY FROM(IN3) TO(RPT) USING(CTL3)
...
//CTL1CNTL DD *
  OUTFIL FNAMES=RPT,REMOVECC,NODETAIL,BUILD=(30X),
    TRAILER1=('DSN1 -',COUNT=(M10,LENGTH=8),' RECORDS')
//CTL2CNTL DD *
  OUTFIL FNAMES=RPT,REMOVECC,NODETAIL,BUILD=(30X),
    TRAILER1=('DSN2 -',COUNT=(M10,LENGTH=8),' RECORDS')
//CTL3CNTL DD *
  OUTFIL FNAMES=RPT,REMOVECC,NODETAIL,BUILD=(30X),
    TRAILER1=('DSN3 -',COUNT=(M10,LENGTH=8),' RECORDS')
...

Re: datasets record count

PostPosted: Fri Jul 09, 2010 5:35 am
by jawaharsmg
Hi Frank,

Thanks for the reply.

Is there a limit on the number of control cards - I have around 15 datasets that need to be included.

Thanks
Jawahar Hussain

Re: datasets record count

PostPosted: Fri Jul 09, 2010 6:27 am
by dick scherrer
Hello,

What happens when you run a test with 15?

Suggest running such a test and post back here if there are any questions or problems.

Re: datasets record count

PostPosted: Fri Jul 09, 2010 7:19 pm
by jawaharsmg
I had run thru with 15 files and got a S878 abend RC 10.

I am running a region=0M and pointing the output to SYSOUT.

Thanks
Jawahar

Re: datasets record count

PostPosted: Fri Jul 09, 2010 9:15 pm
by Frank Yaeger
Is there a limit on the number of control cards


No.

I had run thru with 15 files and got a S878 abend RC 10.


Please show the complete JES log here or send it to me offline (yaeger@us.ibm.com) and reference this thread.