JCL to count the number of records



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

JCL to count the number of records

Postby Purushoth » Fri Dec 31, 2010 1:16 am

Write the JCL to count the number of records in PS file?
Purushoth
 
Posts: 7
Joined: Mon Nov 01, 2010 10:05 am
Has thanked: 0 time
Been thanked: 0 time

Re: JCL

Postby dick scherrer » Fri Dec 31, 2010 2:40 am

Hello,

You need to spend a lot of time studying/learning and post here when you have an actual question or problem.

The forum is here to help you do things - not to simply do the things for you. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: JCL

Postby Robert Sample » Fri Dec 31, 2010 3:01 am

To repeat an often stated point: JCL cannot count the number of records in a file. JCL does one thing and only one thing -- it executes programs. These programs may be utilities (such as SORT, IEBGENER, IEFBR14, IEBCOPY) or application programs or vendor programs. But all JCL can do is execute programs.

So the correct and complete answer to your question is that it is not possible to write JCL to count the number of records in a physical sequential file. If you had stated you wanted to write JCL using (SORT, SAS, application program, etc) to count the number of records in a file -- that can be done (and in most cases very easily). But just using JCL, you cannot do ANYTHING since JCL does nothing but execute programs.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: JCL

Postby Frank Yaeger » Fri Dec 31, 2010 3:49 am

Purushoth,

See the "Display the number of input or output records" Smart DFSORT Trick at:

http://www.ibm.com/support/docview.wss? ... g3T7000094
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: JCL to count the number of records

Postby steve-myers » Fri Dec 31, 2010 12:16 pm

The REPRO command inside IDCAMS also tells you the number of records it copied when it completes. This manual discusses IDCAMS, the REPRO command, and the JCL for IDCAMS in all its glory. REPRO can copy sequential non-VSAM data sets as well as VSAM data sets.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post