Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

finding no of records in multiple files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vickey_dw

New User


Joined: 10 Jun 2015
Posts: 30
Location: India

PostPosted: Wed Jul 22, 2015 12:59 pm    Post subject: finding no of records in multiple files
Reply with quote

Hello Experts,

I know how to find number of records in single file using

Code:
SORT FIELDS=COPY
  OUTFIL REMOVECC,NODETAIL,
   TRAILER1=('No of records: ',COUNT=(M11,LENGTH=8))




But Is there any way i can find no of recods present in multiple files ?

Means i have 5 files and i want to find no of records present in each of them in single output file and in only one step in jcl.


Like if my 1st files has 15000 records,2 file has 17000,3rd -->20000 , 4th-->50000 and 5th -->10000.Then my output should be like below


Code:
15000
17000
20000
50000
10000


Please provide your suggestion on this
Back to top
View user's profile Send private message

vickey_dw

New User


Joined: 10 Jun 2015
Posts: 30
Location: India

PostPosted: Wed Jul 22, 2015 1:53 pm    Post subject:
Reply with quote

guys i got the solution

Sorry for not doing enough research

here is my working code using ICETOOL

Code:
//TOOLIN  DD *
 COPY FROM(IN01) TO(OUT) USING(CT01)
 COPY FROM(IN02) TO(OUT) USING(CT02)
//CT01CNTL DD *
  OUTFIL FNAMES=OUT,REMOVECC,NODETAIL,
   TRAILER1=(COUNT=(M11,LENGTH=5))

//CT02CNTL DD *
  OUTFIL FNAMES=OUT,REMOVECC,NODETAIL,
   TRAILER1=(COUNT=(M11,LENGTH=5))
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7240

PostPosted: Wed Jul 22, 2015 2:42 pm    Post subject: Reply to: finding no of records in multiple files
Reply with quote

Why don't you just use ICETOOL's COUNT operator?
Back to top
View user's profile Send private message
vickey_dw

New User


Joined: 10 Jun 2015
Posts: 30
Location: India

PostPosted: Fri Jul 24, 2015 12:12 pm    Post subject:
Reply with quote

Thank you very much bill for suggestion

ICETOOL Count is working much faster than earlier one


Code:
//TOOLIN  DD *
  COUNT FROM(IN01) USING(CTL1) WRITE(OUT) DIGITS(8)
  COUNT FROM(IN02) USING(CTL2) WRITE(OUT) DIGITS(8)
  COUNT FROM(IN03) USING(CTL3) WRITE(OUT) DIGITS(8)
  COUNT FROM(IN04) USING(CTL4) WRITE(OUT) DIGITS(8)
  COUNT FROM(IN05) USING(CTL5) WRITE(OUT) DIGITS(8)
/*
//CTL1CNTL DD *
  INCLUDE COND=ALL
/*
//CTL2CNTL DD *
  INCLUDE COND=ALL
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7240

PostPosted: Fri Jul 24, 2015 12:40 pm    Post subject: Reply to: finding no of records in multiple files
Reply with quote

You don't need the USINGs, either. I've never actually seen COND=ALL being used. INCLUDE COND=ALL is identical to having no INCLUDE at all.

The very most efficient way (used to be the standard way) is to always count the records whenever you process a file, and show them at the end. You then don't ever have to count them separately.

Then you match them to trailer counts, match between programs, match across systems, etc. All done "automatically" (by coding it) and ensuring records are lost or duplicated or added in error, etc.
Back to top
View user's profile Send private message
vickey_dw

New User


Joined: 10 Jun 2015
Posts: 30
Location: India

PostPosted: Fri Jul 24, 2015 2:20 pm    Post subject:
Reply with quote

got your point bill thanks for detailed explaination icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 5 Fri Dec 09, 2016 4:40 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us