MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding a batch control number in the Header

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
badri5
Banned


Joined: 27 Jun 2006
Posts: 18
Topics: 16

PostPosted: Fri Mar 02, 2012 3:53 am    Post subject: Adding a batch control number in the Header Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Mar 02, 2012 12:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group