Is this possible using Sort program

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
ram gopal99
Member
Posts: 2
Joined: Wed Jun 01, 2016 6:54 am

Is this possible using Sort program

Post by ram gopal99 » Wed Jun 01, 2016 7:07 am

Hello

I have the following file :

custno balance intacc intassed branch number

11111 150 40 50 98196

22222 150 30 40 98197

33333 200 80 70 98196

44444 300 90 90 98196

My output should be with sum of balance, sum of int=(intacc-intassed) for each branch (number). Is this possible using sort using SUM fileds .

thanks

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Wed Jun 01, 2016 10:17 am

Well, you'll need to SORT on branch, so that leaves SUM as an easy option, but I think still better to use OUTFIL reporting features, REMOVECC,NODETAIL and SECTIONS with TRAILER3. SORT will take care of the field-sizes, with SUM you have to do that yourself (extending the fields in INREC if they may be going to overflow).

ram gopal99
Member
Posts: 2
Joined: Wed Jun 01, 2016 6:54 am

Post by ram gopal99 » Wed Jun 01, 2016 4:20 pm

thank you . Can you please give me an example to write

Post Reply

FREE TUTORIALS

Tutorials
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.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others