View previous topic :: View next topic |
Author |
Message |
badri5 Banned
Joined: 27 Jun 2006 Posts: 18 Topics: 16
|
Posted: Fri Mar 02, 2012 3:53 am Post subject: Adding a batch control number in the Header |
|
|
Hi,
In my files header and trailer is there but it does not have a control number to the header.
Header contains only header date and time
eg
HH2012-03-0121:00
I have to add a control number to the header
Could you tell me the Logic how to add a control number to the header
If a file has a header & trailer
Add a batch control number in the header that will be incremented in each execution
If the file uses the daily/month-to-date control file
(a) Add control number to the file
Else
(b) Create a control number file
Else (c)
Create header record with a control number that will be incremented in each execution
Create trailer record with a record count
Create a control number file.
Thanks
Badri |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Mar 02, 2012 12:18 pm Post subject: |
|
|
badri5,
This is basic coding exercise. Assuming COBOL is the language being used.
1. Read the file in I-O Mode for 1 header record.
2. Add 1 to the counter
3. write the header record.
It is as simple as that.
Alternatively you can change the program which creates the file to write the counter too. |
|
Back to top |
|
 |
|
|