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: 42
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: 42
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: 7315

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: 42
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: 7315

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: 42
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
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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