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 

Header and Trailor

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Interview Q & A
View previous topic :: View next topic  
Author Message
veeru_ch
Beginner


Joined: 11 Dec 2003
Posts: 4
Topics: 2

PostPosted: Sun Apr 22, 2007 2:46 pm    Post subject: Header and Trailor Reply with quote

Hi,
Can any one explain me what is use of header and trailor records in a file. This is an interview question.

Thanks in Advance
Veer
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sun Apr 22, 2007 3:19 pm    Post subject: Reply with quote

A Header record would contain information that would differentiate this file from other files - date, etc - is made up of info known at the begining of he process that created the file. A header record is the the first record in the file.

A Trailer record would contain statistics about the file that were accumulated during the process that created the file- counts, amount totals , etc... A trailer record would be the last record in the file.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
veeru_ch
Beginner


Joined: 11 Dec 2003
Posts: 4
Topics: 2

PostPosted: Mon Apr 23, 2007 3:49 am    Post subject: Reply with quote

Dick, Thanks for the quick reply, Is there is any possibility of having more than one trailor for a file.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Apr 23, 2007 4:19 am    Post subject: Reply with quote

well, yeah. depends upon the original design. there maybe more data to pass with the trailer record than can fit in one record.

normally when a ds (dataset) has more than one record type, there is a common field, (often the first char) that defines the record type; for example:
  • 1 - header record
  • 2 - detail record
  • 3 - trailer record
This can obviously become more complex and require two char for the definition
  • 01 - header
  • 02 - detail record type 1
  • 03 - detail record type 2
  • 04 - detail record type 3
  • 12 trailer record with accumulated stats on detail record type 1
  • 13 trailer record with accumulated stats on detail record type 2
  • 14 trailer record with accumulated stats on detail record type 3
  • 99 trailer record with accumulated stats on complete DS


Normally, a program that processes a DS which contains header/detail/trailer record, the individual trailer records are compare to accumulations to insure that number of records and totals in are equal to those output by the creating program.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Mon Apr 23, 2007 4:38 am    Post subject: Reply with quote

veeru_ch wrote:
Is there is any possibility of having more than one trailor for a file.


Yes you can have.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Interview Q & A 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