It is not the "length of the file" it is the record-length.
-
- Registered Member
- Posts: 12
- Joined: Mon Sep 29, 2014 11:45 am
It is not the "length of the file" it is the record-length.
HI
I created this post Segregating a variable length file in to different files.. What is the meaning of statement "It is not the "length of the file" it is the record-length." Is not it one or the same thing?
I created this post Segregating a variable length file in to different files.. What is the meaning of statement "It is not the "length of the file" it is the record-length." Is not it one or the same thing?
Re: It is not the "length of the file" it is the record-length.
1) it is not a file but a dataset
2) a record is a single item within the dataset - a dataset contains 0 to many records. The length of a dataset is the combined length of all the records within it plus the lengths of each inter-block gap plus the length of included control information. A bit of simple thinking would tell you this.
2) a record is a single item within the dataset - a dataset contains 0 to many records. The length of a dataset is the combined length of all the records within it plus the lengths of each inter-block gap plus the length of included control information. A bit of simple thinking would tell you this.
Regards
Nic
Nic
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: It is not the "length of the file" it is the record-length.
Consider a data set with fixed 80-byte length records. The data set has 10,000 records (exactly) in it. The record length for each and every record is 80 bytes. However, the data set has a total size of 800,000 bytes (10000 times 80). If you transfer this data set to a PC, the resulting PC file will be at least 800,000 bytes (more if transferred as text), not 80 bytes.What is the meaning of statement "It is not the "length of the file" it is the record-length." Is not it one or the same thing?
-
- Registered Member
- Posts: 12
- Joined: Mon Sep 29, 2014 11:45 am
Re: It is not the "length of the file" it is the record-length.
Hmm.. yes a rational thinking is all we need but I thought to ask it as a discussion. And thought to start a new thread so that I don't disturb the existing one.nicc wrote:1) it is not a file but a dataset
2) a record is a single item within the dataset - a dataset contains 0 to many records. The length of a dataset is the combined length of all the records within it plus the lengths of each inter-block gap plus the length of included control information. A bit of simple thinking would tell you this.
I understand that a dataset can have many records but we also refer the file length as "Logical record length" which is always, logically assumed to be the file length while it's the length of the highest record in the file. So it's not really a length of the file, so to say, it's the length of the record?
You also said, "it is not a file but a dataset", but we can use the interchangeably right? Or can not we?
-
- Registered Member
- Posts: 12
- Joined: Mon Sep 29, 2014 11:45 am
Re: It is not the "length of the file" it is the record-length.
Thank you Robert.Robert Sample wrote:Consider a data set with fixed 80-byte length records. The data set has 10,000 records (exactly) in it. The record length for each and every record is 80 bytes. However, the data set has a total size of 800,000 bytes (10000 times 80). If you transfer this data set to a PC, the resulting PC file will be at least 800,000 bytes (more if transferred as text), not 80 bytes.What is the meaning of statement "It is not the "length of the file" it is the record-length." Is not it one or the same thing?
Re: It is not the "length of the file" it is the record-length.
Being pedantic, and technically, correct then you cannot use 'file' instead of 'dataset'. We know what you mean and we (all?) use the terms interchangeably - but we shouldn't especially if you are discussing PC/*nix files and z/os datasets in the same conversation.
We NEVER refer to the dataset length as the logical record length - the two are entirely different things. The logical record length is the length of an individual record,
the physical record length is the length of a block which usually contains several logical records, the 'file' length is the sum of the lengths of all the records within the file plus any inter-block gaps and embedded control data.
We NEVER refer to the dataset length as the logical record length - the two are entirely different things. The logical record length is the length of an individual record,
the physical record length is the length of a block which usually contains several logical records, the 'file' length is the sum of the lengths of all the records within the file plus any inter-block gaps and embedded control data.
Regards
Nic
Nic
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: It is not the "length of the file" it is the record-length.
The ONLY time the term "file" should be used on a mainframe is when you are talking about Unix System Services files. z/OS has data sets, and since z/OS runs Unix System Services which has files, the terms are NOT interchangeable -- a "file" is a Unix System Services term and a "data set" is a z/OS term. A file will have Unix permissions while a data set won't. A file is in a directory; a data set is not.You also said, "it is not a file but a dataset", but we can use the interchangeably right? Or can not we?
Practically, when the context is clear, a data set is sometimes referred to as a file even though technically the term is used wrongly. However, especially since Unix System Services came along and directories / files became relevant to z/OS, I personally have tried to avoid the term "file" in referring to z/OS data sets since it is easy to be misinterpreted.
-
- Registered Member
- Posts: 12
- Joined: Mon Sep 29, 2014 11:45 am
Re: It is not the "length of the file" it is the record-length.
Thanks but in JCL we always make use of LRECL which actually mean logical record length and relate to the dataset mentioned there. Then is it actually relating to the records and not the data set?nicc wrote:Being pedantic, and technically, correct then you cannot use 'file' instead of 'dataset'. We know what you mean and we (all?) use the terms interchangeably - but we shouldn't especially if you are discussing PC/*nix files and z/os datasets in the same conversation.
We NEVER refer to the dataset length as the logical record length - the two are entirely different things. The logical record length is the length of an individual record,
the physical record length is the length of a block which usually contains several logical records, the 'file' length is the sum of the lengths of all the records within the file plus any inter-block gaps and embedded control data.
-
- Registered Member
- Posts: 12
- Joined: Mon Sep 29, 2014 11:45 am
Re: It is not the "length of the file" it is the record-length.
"A file is in a directory; a data set is not", directory as in "folder"? or you mean some meaning?Robert Sample wrote:The ONLY time the term "file" should be used on a mainframe is when you are talking about Unix System Services files. z/OS has data sets, and since z/OS runs Unix System Services which has files, the terms are NOT interchangeable -- a "file" is a Unix System Services term and a "data set" is a z/OS term. A file will have Unix permissions while a data set won't. A file is in a directory; a data set is not.You also said, "it is not a file but a dataset", but we can use the interchangeably right? Or can not we?
Practically, when the context is clear, a data set is sometimes referred to as a file even though technically the term is used wrongly. However, especially since Unix System Services came along and directories / files became relevant to z/OS, I personally have tried to avoid the term "file" in referring to z/OS data sets since it is easy to be misinterpreted.
- Akatsukami
- Global Moderator
- Posts: 122
- Joined: Tue Oct 20, 2015 3:20 am
- Location: Bloomington, IL
- Contact:
Re: It is not the "length of the file" it is the record-length.
That is basically correct, although that you won't "always make use of LRECL"; you do not use it on data sets with a status of OLD or SHR, and many utilities can (and do) determine the LRECL of their outputs themselves.Gaurav ABN wrote:Thanks but in JCL we always make use of LRECL which actually mean logical record length and relate to the dataset mentioned there. Then is it actually relating to the records and not the data set?
"I come to the conclusion that, men loving according to their own will and fearing according to that of the prince, a wise prince should establish himself on that which is in his own control and not in that of others." -- Niccolò Machiavelli
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: It is not the "length of the file" it is the record-length.
ABSOLUTELY NOT! A "folder" is a Windows construct and has no meaning on a mainframe. A Unix directory is equivalent to a folder on Windows but they are different (one key respect is that only Windows will have folders; Unix systems -- including the mainframe -- has directories)."A file is in a directory; a data set is not", directory as in "folder"? or you mean some meaning?
-
- Registered Member
- Posts: 12
- Joined: Mon Sep 29, 2014 11:45 am
Re: It is not the "length of the file" it is the record-length.
Thank you!Akatsukami wrote:That is basically correct, although that you won't "always make use of LRECL"; you do not use it on data sets with a status of OLD or SHR, and many utilities can (and do) determine the LRECL of their outputs themselves.Gaurav ABN wrote:Thanks but in JCL we always make use of LRECL which actually mean logical record length and relate to the dataset mentioned there. Then is it actually relating to the records and not the data set?
But should not the concept be applicable to all the type of DISP equally and should not change its meaning of it as per the different DISP parameters?
-
- Registered Member
- Posts: 12
- Joined: Mon Sep 29, 2014 11:45 am
Re: It is not the "length of the file" it is the record-length.
Thanks for the clarification. This is helpful.Robert Sample wrote:ABSOLUTELY NOT! A "folder" is a Windows construct and has no meaning on a mainframe. A Unix directory is equivalent to a folder on Windows but they are different (one key respect is that only Windows will have folders; Unix systems -- including the mainframe -- has directories)."A file is in a directory; a data set is not", directory as in "folder"? or you mean some meaning?
Re: It is not the "length of the file" it is the record-length.
You only need to specify LRECL and RECFM when creating a dataset. That information is recorded and the system can reference it at all other times. You really need to read various manuals to get the basics sorted out.
Regards
Nic
Nic
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute