SC23-6855-30, DFSMS Using Data Sets Version 2 Release 3, pages 198-200 of the 
PDF in "Chapter 11. Processing Control Intervals" describe the format of the 
RDF and CIDF control fields in a VSAM control interval.

From that documentation it does not appear to me to be an architected 
restriction that an RDF cannot exist for a zero-length record.  Based on that 
documentation I would expect that a valid RDF for a single (not repeated) 
zero-length record would look like:

X'000000'

Byte zero (flag byte) of the RDF has reserved bits 0, 6 and 7 set to zero along 
with the RRDS-only bit 5, bit 1 set to zero indicating there is NOT a paired 
RDF to the left of this RDF, bit 4 = 0 indicating that the 2-byte binary number 
in the RDF contains the length of the record and bits 2 and 3 set to B'00' 
indicating that this record does NOT span control intervals.

Bytes one and two of the RDF contain the record length, in this case zero.

Whether either the z/OS VSAM PUT function or the utility IDCAMS REPRO function 
or the SORT "OPTION COPY" function support such an RDF is an entirely different 
set of questions.

RRDS format files use bit 5 in the RDF flag byte to indicate if a fixed-length 
record in that slot exists at all, but that is not applicable to an ESDS format 
file..

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Paul Gilmartin
Sent: Monday, December 30, 2019 1:13 PM
To: [email protected]
Subject: Re: VSAM record length 0

On Mon, 30 Dec 2019 16:05:37 +0100, R.S. wrote:

>W dniu 2019-12-27 o 23:55, Frank Swarbrick pisze:
>> So I am trying to copy sequential file to a VSAM ESDS.  One of the lines in 
>> the source file has a record length of zero.  Apparently VSAM does not 
>> support zero-length records?  Can this be true?  This blank line has 
>> "meaning".  What are my options?
>
>First: THERE ARE NO RECORDS WITH LENGTH 0. Period.
>I repeat: there are no zero-length records.
>
>There are conventions to describe a record which has no data (no 
>content). It can be CRLF for DOS/Windows text files. However there are 
>CR and LF characters to describe the record, so the content is empty.
>Yes, empty record has 2 bytes of metadata. ...
>
Thank you for mentioning the distinction between metadata and content.

>It could be RDW which means 4 bytes for metadata, etc. etc.
>
And in DSORG=PS,RECFM=VB an RDW of x'00040000' is a record with metadata and no 
content.

>Of course some conventions do not allow to put empty records. Is VSAM 
>one of them? It depends: ESDS is one of them, ...
>
Might someone explain to the OP and me the format of ESDS metadata that 
prohibits records with metadata but no content.  I struggled with Using Data 
Sets and got lost.

(An analogy might be the biased count field in the MVC instruction that can not 
refer to empty content.)

Thanks,
gil

----------------------------------------------------------------------

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to