Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Creating Header Record with Summary Information

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rajanish

New User


Joined: 02 May 2006
Posts: 7
Location: Charlotte, NC, US

PostPosted: Tue Oct 17, 2006 7:41 pm    Post subject: Creating Header Record with Summary Information
Reply with quote

Hi,

I am currently working on a Reformatting code, I receive a input transaction file having some account & amount fields, Using this i create a o/p file which will add up the amounts for a particular account and then populate a header with the amount total followed by the list of detail transactions, I can have multiple headers in my file each having a set of detail records.

When populating the header i need to know to total amount & all the total no of detail record having the same account in advance. because I need my header written first then only i write the detail records in my o/p file. Also I cant store the individual transactions in an array as the file is very huge its having around 1 Million records.
I can create a header without the summary information(Amount total) and then read the file again just to update the header.

Is there a better solution.

Thanks in advance, I would greatly appreciate your help.

Regards
Rajanish
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Oct 17, 2006 10:55 pm    Post subject: Re: Creating Header Record with Summary Information
Reply with quote

Rajanish,

What is the max number of detail rrecords you are going to have per header record? This would be the number you would have to store is a COBOL table, not the entire transaction file.

The transaction file should be sorted by account number prior to processing.

Also you might look at using DFSORT for this. Frank Yaeger of the DFSORT/ICETOOL forum can probably give you a DFSORT solution.

Dave
Back to top
View user's profile Send private message
rajanish

New User


Joined: 02 May 2006
Posts: 7
Location: Charlotte, NC, US

PostPosted: Tue Oct 17, 2006 11:39 pm    Post subject:
Reply with quote

Thanks Dave,

My Program can have all the records summarized in a single header or can have 100 headers, It all depends on the file i receive.
Anyway I will try looking at DFSORT.
Back to top
View user's profile Send private message
reddy307
Currently Banned

New User


Joined: 09 Jun 2006
Posts: 18

PostPosted: Wed Oct 18, 2006 2:48 pm    Post subject: Re: Creating Header Record with Summary Information
Reply with quote

by using DFSORT u can achieve it

try the following code to summarise the fields

sort fields=(starting pos, length,format,a/d) this is of ACCOUNT NO
Sum fields=(the fields that u need to summarise)


then u will get the summarised fields for each acct no

then u can use that in ur COBOL pgm

Regards
Reddy
Back to top
View user's profile Send private message
rajanish

New User


Joined: 02 May 2006
Posts: 7
Location: Charlotte, NC, US

PostPosted: Thu Oct 19, 2006 6:45 am    Post subject: Creating Header Record with Summary Information
Reply with quote

Thank you.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Information About the Equifax Securit... Rohit Umarjikar PC Guides & IT News 6 Mon Sep 11, 2017 9:10 pm
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts retrieving envelope information out o... VintageReceiver TSO/ISPF 6 Thu Aug 10, 2017 8:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us