👁 0
Q: What is the difference between KSDS and ESDS?
Answer:
KSDS (Key Sequenced Data Set):
- Records accessed by unique key
- Records stored in key sequence
- Has both data and index components
- Supports random and sequential access
- Can delete and reinsert records
- Most commonly used VSAM type
ESDS (Entry Sequenced Data Set):
- Records stored in arrival order
- Accessed by RBA (Relative Byte Address)
- No index component
- Cannot delete records (only mark inactive)
- Similar to sequential files
- Good for logs, audit trails
Use KSDS when: You need key-based access, updates, deletes
Use ESDS when: Sequential processing only, append-only data
👁 0
Q: What is ORGANIZATION clause?
Answer:
ORGANIZATION specifies file structure: SEQUENTIAL (default), INDEXED (VSAM KSDS), RELATIVE (RRDS). Determines access methods available. INDEXED requires RECORD KEY. ACCESS MODE can be SEQUENTIAL, RANDOM, or DYNAMIC.
👁 0
Q: How to handle file status 23?
Answer:
Status 23 is record not found for random READ or START. Key doesn't exist. Check key value, spelling. May be legitimate (check if exists logic). START with EQUAL, GTEQ, LTEQ options.
👁 0
Q: How to access RRDS?
Answer:
ACCESS MODE IS RANDOM. Use RELATIVE KEY for slot number. READ/WRITE by slot. STATUS 23 if slot empty. Can have empty slots. Record size fixed for RRDS.
👁 0
Q: What is CISIZE calculation?
Answer:
CISIZE must hold at least one record plus overhead. Formula complex. Let system default usually best. Common sizes: 4096, 8192, 16384. Larger CI can improve sequential, hurt random.
👁 0
Q: What is SPANNED records impact?
Answer:
Spanned records span CIs. More I/O for spanned record access. CI header overhead per CI. Avoid if possible by larger CI. Performance degradation for random access.
👁 0
Q: How to write VSAM random?
Answer:
ACCESS MODE IS RANDOM or DYNAMIC. WRITE record writes at key position. For KSDS, key must not exist (status 22). For ESDS, writes at end. RANDOM/DYNAMIC MODE required.
👁 0
Q: What is CONTROLINTERVALSIZE?
Answer:
CONTROLINTERVALSIZE sets CI size explicitly. CONTROLINTERVALSIZE(4096). Powers of 2, max 32768. Let system default usually. Larger CI better sequential, worse random. Match to workload.