Microsoft KB Archive/37771

Differences Between MS COBOL 3.0 ISAM & IBM Mainframe VSAM

PSS ID Number: Q37771 Article last modified on 04-20-1993

3.00 | 3.00 MS-DOS | OS/2

Summary: There are several fundamental differences between how Virtual Storage Access Method (VSAM) files and Indexed Storage Access Method (ISAM) files are implemented on the many different computer systems available today. Despite the difference between file formats, the syntax used to access ISAM files through Microsoft COBOL Version 3.0 is the same as that used in IBM’s VS/COBOL II on the mainframes. The syntax similarity allows the code generated on one computer system to be ported to another with minimal changes.

More Information: Even though the syntax implementation is the same in the COBOL language, the actual file structure is totally incompatible. IBM’s VSAM has a different file for each alternate key, and each key can have an explicit access method (i.e., keyed, relative, or sequential). This is the major difference between Microsoft COBOL Version 3.0 ISAM file structure and IBM’s VSAM file structure. COBOL Version 3.0 ISAM structures use one file for the primary key and all the alternate keys, with a maximum of 80 alternate keys. While no explicit access method can be defined per alternate key beforehand, this is handled through the program by using the different access methods (i.e., keyed, dynamic, or sequential). Therefore, when developing programs that will be ported to/from Microsoft COBOL Version 3.0, and will use VSAM/ISAM, files should have no problem with the FILE SECTION in the source code. But the file structures will have to be rebuilt for any VSAM/ISAM files ported from one computer to the other. One approach is to convert the mainframe file to a LINE SEQUENTIAL file and download it to the PC (Personal Computer). Then read that LINE SEQUENTIAL file into a COBOL Version 3.0 program that writes it out as a new ISAM file.

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.