what is the meaning of KEYS(20 10)?
-
The key is 10 bytes long and starts in the 21st byte of the record
-
The key is 10 bytes long and starts in the 20th byte of the record.
-
The key is 20 bytes long and starts in the 10th byte of the record.
-
The key is 20 bytes long and starts in the 11th byte of the record
The KEYS parameter in VSAM defines the key's length and starting position using the format KEYS(length, start). KEYS(20 10) means a 20-byte key starting at position 10. Since positions are 1-indexed, position 10 is the 10th byte, so the key occupies bytes 10-29, which means it starts in the 11th byte. Options A, B, and C misinterpret the parameter values or indexing.
In COBOL/VSAM record-key definitions, KEYS(length, offset) specifies the key's length and its zero-based starting displacement within the record. KEYS(20,10) means the key is 20 bytes long, and since the offset (10) is zero-based, the key actually starts at the 11th byte of the record (byte position 0-9 are skipped, byte 10 = the 11th physical byte). So "20 bytes long, starts in the 11th byte" is correct. The other options either swap the length/offset values or fail to account for the zero-based offset (treating 10 as the 10th byte instead of the 11th).