IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Total using INREC


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Log Thangavel

New User


Joined: 19 Jan 2018
Posts: 18
Location: USA

PostPosted: Sun Apr 14, 2019 12:25 am
Reply with quote

Hi Team,

I have requirement to get the total of credit and debits separately in trailer using SORT

Is possible to use TOT and calculate total based on condition like

If credit then sum the data in position 10 and

If Debit then sum the data in same position 10.

The total of credit & debit should be in different position in trailer.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Sun Apr 14, 2019 7:08 pm
Reply with quote

Use INREC, or OUTREC with IFTHEN to create separate temporary columns for debit/credit, then use different TOTs to calculate totals separately (and use BUILD to eliminate the temporary columns in the final report, if needed)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts INREC PARSE used to sort a CSV file DFSORT/ICETOOL 2
No new posts Build a trailer with total an count SYNCSORT 6
No new posts total number of bytes PL/I & Assembler 10
No new posts Checking the total counts inside a re... JCL & VSAM 5
Search our Forums:

Back to Top