QSAM files can be accessed using AIS via the FLAT file driver. This provides full SQL access to QSAM files from all supported AIS environments including ODBC, JDBC, ADO, XML, ADO.NET. This post provides a quick "dump" of facts related to QSAM file access. For more info check out the FLAT file driver documentation.

Note the following:

1. You can import from COBOL copybooks as you would for VSAM.
2. UPDATE and INSERT are supported. Naturally DELETE is not possible from QSAM files.
3. As with VSAM, only QSAM files which can be represented in a COBOL copybook (or PL/I etc) are supported.
4. Unlike the FLAT datasource on other platforms, no bulk readahead is performed on MVS. The reason is that QSAM files are not really stream files - we actually read them in record mode one record at a time.
5. Variable length records are supported for QSAM.
6. An RFA field is automatically added for every QSAM table definition. This field holds the record number of the record read (starting from zero). The RFA can be used for fast access (select ... where rfa=...).
7. Note that the RFA column always comes with an index defined on it making the table definition of organization "indexed". This is, or course, a virtual index but this doesn't matter from the AIS query processor point of view - if it provides fast direct access to a record, it is an index.
8. The RFA field is created as explicitSelect='true'. This means that "select *" will not include the RFA - you can do "select rfa,*" instead.
9. AIS database triggers (user exits) are supported for QSAM files, so it is possible to write a load module which manipulates the data after/before reads/writes.
10. You can set headerRows=... to skip some control records at the top of the file.
11. CDC is not supported for QSAM files.
12. DDL is supported if you want to create a QSAM file "on the fly" - just be sure to configure a newFilelocation attribute providing a HLQ for the created files.