Joined: 22 Apr 2006 Posts: 6258 Location: Mumbai, India
Further, In IBM mainframe OS, a queued sequential access method (QSAM) is one of the access methods for files. QSAM files are unkeyed, with the records placed one after another, according to entry order. A program can process these files only sequentially, retrieving (with the READ statement or GET macro instruction) records in the same order as they are in the file. Each record is placed after the preceding record.
QSAM files can be on tape, direct access storage devices (DASDs), unit-record devices, and terminals. QSAM processing is best for tables and intermediate storage.
From COBOL point of view, to process QSAM files in a program, a programmer could use COBOL language statements that identify and describe the QSAM files in the ENVIRONMENT DIVISION and the DATA DIVISION.
After a record is created, its length or its position in the file cannot be changed, and it cannot be deleted. QSAM files can, however, be updated on DASD (using REWRITE). The record definitions that are coded in COBOL program and the length of the variables read into and written from determines the amount of data transferred.