Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SUM of All trailer AMTS and Number of Records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
chanchal_tirpude

New User


Joined: 23 Jun 2005
Posts: 5

PostPosted: Wed May 10, 2006 2:03 pm    Post subject: SUM of All trailer AMTS and Number of Records
Reply with quote

Hi All,

I have a five input files ,each input file has header, detail records and then trailer .Now trailer contains the amt which is sum of all detail records ,alongwith this amt field in trailer got one more field which says number of records ( this has number of details records + 1 (header record )) .

So now all this five input files we are going to merge in one oputput file which will have only one header ,all the details records of all the input files and one trailer at the end . I have done with merge and amounts add but got problem in number of record field of trailer ,it still has the count of all headers of all 5 input files ,instead it should be 4 less in final output file.

e.g.

IF we have five detail records of amt 1000
Then
file 1 trailer will have
AMT = 5000
Records= 6(Number of details + 1 header)

So same like above for other 4 input files


Now in output file trailer we will get

AMT = 25000 (Trailer amt add of 5 trailers)
Records =30 (which is wrong since we have one header in final output file ,so it should be 26 )

Hope I m clear, expecting some help on this

Thanks,
Chanchal
Back to top
View user's profile Send private message

IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Wed May 10, 2006 3:03 pm    Post subject: Re: SUM of All trailer AMTS and Number of Records
Reply with quote

If you want assistance you really have to give more details.

Examples of data in the input files would be a basic requirement.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed May 10, 2006 9:02 pm    Post subject:
Reply with quote

Chanchal,

Please show:

- an example of your input records
- the job you're currently using to merge the files (JCL and control statements)
- an example of the output produced by this job
- an example of the output you want
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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us