count the records in jcl

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
Dhreeti Panigrahi
Posts: 1
Joined: Thu Dec 04, 2014 8:13 am

count the records in jcl

Post by Dhreeti Panigrahi » Thu Dec 04, 2014 8:25 am

Hi All,

Write a jcl to meet the requirement.

Requirement---There is a input file which containing account number and sequence number against each account number .write a jcl to count total sequence numbers generated for each account.

Example--- input file

Acct no seq nubr

01 001

01 012

01 045

01 025

02 076

02 087

02 098

02 011

Output will be : 01 4

02 4

Posts: 48
Joined: Tue May 06, 2014 11:22 am

Post by dhiraj » Tue Dec 16, 2014 3:42 pm

Your example is not clear, please explain more.
--Dhiraj Mishra

Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Fri Dec 26, 2014 3:16 pm

Code: Select all

//JOBNAME JOB jobcard details
//STEP EXECPGM=yourpgm
//FILEIN DD DSN=your.input.file,DISP=SHR
//OUTPUT DD DSN=your.output.file,DISP=(,CATLG,CATLG),
//       SPACE=(TRK,1),UNIT=yourunit
You may need to replace SYSPRINT by SYSOUT

Post Reply


Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Mainframe Interview questions

Other References
Mainframe Tools and others