Question on COMMIT in DB2 COBOL program.
Posted: Sun Sep 20, 2015 2:07 pm
Interviewer asked a question that in a DB2/COBOL program, we want to update a table and we missed to code COMMIT in the program. Will the table gets updated when the program executes successfully?
Though I answered that when program executes successfully then COMMIT will happen on its own. Hence the table should get updated. But I always thought that without an explicit COMMIT in the program, changes are not permanent. Without coding COMMIT also does it works? Can someone please elaborate on this. Will appreciate your help.
Though I answered that when program executes successfully then COMMIT will happen on its own. Hence the table should get updated. But I always thought that without an explicit COMMIT in the program, changes are not permanent. Without coding COMMIT also does it works? Can someone please elaborate on this. Will appreciate your help.