VSAM interface

If you are replacing a VSAM call with the corresponding tableBASE call, tableBASE now returns the VSAM File status value that corresponds to an equivalent tableBASE Error Code, Error Sub Code, and Found code.

For example, During processing of a sequential retrieval command (example, GF, GN, etc.), a File status value of 10 will be returned upon end of table condition is reached.

In a random retrieval command (Example FK, FC, etc.), A File status value of 23 is returned if KEY NOT FOUND condition occurs.

A new function ID (64) has been introduced to enable this functionality. A new COMMAND-AREA field TB-VSAM-FS-KEY is also introduced in COMMAND-AREA layout. Use the updated COMMAND-AREA when using this functionality.

Following Code-Snippet shows how to use this VSAM Interface in a regular tableBASE call.

DK           MOVE 64 TO TB-FUNCTION-ID                     
DK           CALL DK1TCALL USING TB-PARM                   
                                XXXX-COMMAND-AREA               
                                XXXX-ROW-AREA                       
             END-CALL                                      
DK           MOVE TB-VSAM-FS-KEY TO VSAM-FILE-STATUS  

Ensure that the VSAM file status value returned in TB-VSAM-FS-KEY is moved to your own VSAM-FILE-STATUS field as shown below, so that no additional code changes are required in the error handling part after the I/O is performed.

This should significantly reduce the complexities in changing the code for tableBASE.

Note:
File status “90” is returned to indicate an unknown or unmatched error condition. This means, there is no equivalent File status. If tableBASE calls returns file status “90”, Check tableBASE Error Code and Sub code for further information.