RRDS record structure

For RRDS files opened in record mode, z/OS® XL C/C++ defines the following key structure in the C header file <stdio.h>:
typedef struct {
#ifndef _LP64
unsigned int __fill, /* version: either 0 or 1 */
             __recnum; /* the key, starting at 1 */
#else
unsigned long __fill, /* version: either 0 or 1 */
              __recnum; /* the key, starting at 1 */
#endif /* not _LP64 */
} __rrds_key_type; 
In your source program, you can define an RRDS record structure as either:
 struct {
         __rrds_key_type rrds_key;      /* __fill value always 0 */
         char           data[MY_REC_SIZE];
 }  rrds_rec_0;
or:
 struct {
         __rrds_key_type rrds_key;      /* __fill value always 1 */
         char           *data;
 }  rrds_rec_1;

The z/OS XL C/C++ library recognizes which type of record structures you have used by the value of rrds_key.__fill. Zero indicates that the data is contiguous with rrds_key and 1 indicates that a pointer to the data follows rrds_key.