COBOL ⭐ Featured
👁 0

Q: Explain START statement for VSAM

Answer:
START positions for sequential READ. START filename KEY IS EQUAL/GREATER/NOT LESS THAN key-field. After successful START, READ NEXT retrieves records sequentially from that position. INVALID KEY handles not-found condition.
VSAM
👁 0

Q: How to read VSAM sequentially?

Answer:
OPEN INPUT file. START if positioning needed. READ NEXT repeatedly until status 10 (end of file). CLOSE file. START optional - defaults to beginning. READ NEXT gets records in key sequence for KSDS.