I am in Visual Studio 2010; Visual Cobol 2.0. We are converting some of our ISAM files to MS SQL. I am testing out a proof of concept that a single program can handle rollback of isam files and MS SQL tables. What I have tested; it does not. The SQL did not rollback nor did the ISAM get added back in from the delete. Can a COBOL program rollback handle both types of files. If it can, what is the necessary rollback statement or compile directives that are necessary?????? Background we are try to see if a transactional ISAM file is needed to become MS SQL table.
#VisualCOBOLThe File Handler and OpenESQL components are completely separate entities and there is no single rollback that will handle both.
On the SQL side if you are in a transaction you can either commit or rollback using EXEC SQL COMMIT or EXEC SQL ROLLBACK. In order for this to work you must make sure that autocommit is off which is the default option.
For file handling the only way to get any type of rollback capability is by using the Fileshare component and have this capability turned on. Then COMMIT and ROLLBACK statements within your source will be in effect. If Fileshare is not being used then COMMIT and ROLLBACK statements will be ignored.
Thanks.