Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 51
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: 51
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: 7312

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: 51
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: 7312

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: 51
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 Duplicating records in a PDS memebr/I... imcoolleo COBOL Programming 5 Mon Sep 16, 2019 3:32 pm
No new posts Pack to Unpack conversion for sending... A_programmers COBOL Programming 13 Wed Sep 11, 2019 10:46 pm
This topic is locked: you cannot edit posts or make replies. Compare two files logic in COBOL Nishant Singhal COBOL Programming 4 Sun Aug 25, 2019 2:25 am
No new posts Concatenate two files of variable rec... Thiru S DFSORT/ICETOOL 3 Wed Aug 21, 2019 11:53 pm
No new posts Compare duplicate records in same file pshongal DFSORT/ICETOOL 3 Fri Aug 09, 2019 9:37 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us