ISAM-A uses a different set of statements for accessing the file than ISAM 1.x, so for the most part there is no confusion at the source code level. (They share the same CLOSE statement, but this is true with every other file type as well.) The one ambiguity is in the OPEN statements, which are syntactically similar but semantically different:
ISAM-A:
OPEN #channel, filespec, mode, recnovar, fstatvar {,end'file} {, wait'record} {,wait'file} {,read'only}
ISAM 1.x:
OPEN #channel, filespec, mode, recsize, recnovar {, wait'record} {,wait'file}
If the mode is INDEXED or INDEXED'EXCLUSIVE, the compiler cannot tell from the syntax alone which version of ISAM you are trying to open, and thus must rely on COMPIL switches and rules:
• | OCMPIL assumes ISAM 1.x, while COMPIL and COMPLP (or any version of the A-Shell compiler with /X:1 or /X:2) assume ISAM-A |
• | Adding the /I switch causes COMPIL and COMPLP to assume ISAM 1.x when ambiguous. |
• | Under AMOS, ORUN only supported ISAM 1.x, while RUN and RUNP supported both. Under A-Shell, there is only one RUN and it supports both versions of ISAM. (There is no ambiguity in the RUN file tokens.) |
• | With COMPIL and COMPLP, you can use non-ambiguous forms of the Mode to force the compiler to recognize your intent, regardless of the switches used. ISAMP'INDEXED and ISAMP'INDEXED'EXCLUSIVE indicate ISAM-A, while ISAM'INDEXED and ISAM'INDEXED'EXCLUSIVE indicate ISAM 1.x. |
• | At runtime attempting to open an ISAM file using the wrong version will result in either a file not found (Error 17) or a file type mismatch (Error 25). |