IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Label Records are Standard - What it means?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
andy6703

New User


Joined: 25 Jul 2005
Posts: 14

PostPosted: Fri Jul 29, 2005 10:35 am
Reply with quote

Hi,

What does it mean when we code LABEL RECORDS ARE STANDARD in the File section. Please do give a thorough basic explanation as I want to understand the concept clearly.

Thanks & Regards,
Anuradha.
Back to top
View user's profile Send private message
shivashunmugam Muthu

Active User


Joined: 22 Jul 2005
Posts: 114
Location: Chennai

PostPosted: Fri Jul 29, 2005 10:56 am
Reply with quote

Label records are usually created as the first and last records of a disk or tape to provide identifying information about the file on disk or tape. Labels are created on output files so that, when the same file is later read as input, the labels may be checked to ensure that the file being accessed is the correct one. Labels are created on output files and checked on input files. The COBOL compiler will supply the routine for writing labels on output files or for checking labels on input file if the entry LABEL RECORDS ARE STANDARD is included.

This LABEL RECORDS clause will result in the following :
1. For output files, the first record on disk or tape file will be created as a standard 80-position header label identifying the file to the system; similarly, the last record on the disk or tape will be created as a trailer label.
2. For input files, these labels will be computer-checked to ensure that the file being processed is the correct one.

The clause LABEL RECORDS ARE STANDARD is permitted for disk and tape files only. Devices such as printers do not use label records, since identifying information is unnecessary where data is visible to the human eye. The clause LABEL RECORDS ARE OMITTED is used for such files.

For VSAM files this clause is syntex checked but it has no effect in execution
Back to top
View user's profile Send private message
andy6703

New User


Joined: 25 Jul 2005
Posts: 14

PostPosted: Fri Jul 29, 2005 11:33 am
Reply with quote

Hi shivashunmugam Muthu,

Thanks for such a detailed explanation. Why do we need additional identifying info about a file when filename itself acts as an important identification?

Regards,
Anuradha.
Back to top
View user's profile Send private message
SHIVAREDDY

New User


Joined: 25 Jul 2005
Posts: 20

PostPosted: Fri Jul 29, 2005 12:35 pm
Reply with quote

Hi andy,

I think below explanation is more than enough to understand the statement.For this first u need to know why label records statement is used and then learning standard option is childs play.Go thru the below info.

LABEL RECORD(S) Clause -

Data is stored on disk as magnetized bits or binary digits that cannot be seen by the nak*** eye. Label records, then, are usually created as the first and last records of a disk file to provide identifying information about the file. Since the data on a disk is not visible, these label records can be used to check if the correct file is being accessed for a specific program.

FORMAT

LABEL {RECORD IS} {RECORDS ARE} {OMITTED} {STANDARD}

This LABEL RECORDS clause will result in the following:
1. For output files, the first record on a disk file will be created as a standard 80-position header label identifying the file to the system; similarly, the last record on the disk will be created as a trailer label.

2. For input files, these labels will be computer-checked to ensure that the file being processed is the correct one.

LABEL RECORDS ARE STANDARD
This clause is permitted only for magnetic media such as disk.
LABEL RECORDS ARE OMITTED
This clause is used for printed files since they do not use label records.
Sometimes a disk file may also not have any labels and thus the LABEL RECORDS ARE OMITTED clause would be used.

Send query again if u dont understand clearly.bye.
Back to top
View user's profile Send private message
shivashunmugam Muthu

Active User


Joined: 22 Jul 2005
Posts: 114
Location: Chennai

PostPosted: Fri Jul 29, 2005 1:23 pm
Reply with quote

Hi Anuradha,

Please dont confuse it with mere identification purpose. As per the above reply you shd hav got some fair idea. And one more thing, this clause was mandatory only for COBOL 74. Further in COBOL 85, this was made it as optional.

Purpose is to reduce the FD entries as possible as could. Compare JCL 'LABEL' parameter with this context. You could understand what is the purpose is all about.

Hope you clear now.

Thanks

Shiva
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jul 30, 2005 7:07 pm
Reply with quote

Hi Andy,

Using the more recent compilers as noted by Shiva the LABELS clause is treated as comments.

With earlier compilers the clause was used more for describing the attributes the file than identifying it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top