VSAM - Defining vsam file organization and records - www.cadcobol.com.br



Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

Defining vsam file organization and records

Enterprise COBOL for z/OS, Version 4.2, Programming Guide


Use an entry in the FILE-CONTROL paragraph in the ENVIRONMENT DIVISION to define the file organization and access modes for the VSAM files in your COBOL program.

In the FILE SECTION of the DATA DIVISION, code a file description (FD) entry for the file.
In the associated record description entry or entries, define the record-name and record length.
Code the logical size of the records with the RECORD clause.

Important: You can process VSAM data sets in Enterprise COBOL programs only after you define them with access method services.

VSAM file organization, access mode, and record format

File organization Sequential access Random access Dynamic access Fixed length Variable length
VSAM sequential (ESDS) Yes No No Yes Yes
VSAM indexed (KSDS) Yes Yes Yes Yes Yes
VSAM relative (RRDS) Yes Yes Yes Yes Yes

Related tasks



© Copyright IBM Corp.