Exercise

Rolling back with a savepoint

Building upon the last exercise, it turns out that banks with more than $6 million in MMDAs are twice as likely to sustain during a downturn than those with between $5 and 6 million in that same asset class. Here I've made a mistake in the sample code, and we need to rollback to the save point to maintain data integrity.

Instructions

100 XP
  • Inside a transaction set FIELD48 to 'MMDA+' where RCON6810 (MMDA amount) is greater than $6 million.
  • Set mmdaplus_flag_set as a savepoint.
  • Set FIELD48 to 'MMDA+' where RCON6810 (MMDA amount) is greater than $5 million (this is a mistake).
  • Undo back to mmdaplus_flag_set, end the transaction, and count the 'MMDA+' records.