Since we running the DLI update jobs in DB downtime, we are facing few sync-up issues ( Sync-up process with DB2 tables) in the region. To avoid this issue, we have planned to convert those jobs as BMP update jobs which will run in DB uptime. This decision was taken as we didn't face any issues with BMP update jobs. Please let us know, If we can run the DLI update jobs in DB uptime? If not, I would like to know the reason for the same. Thanks in advance !
Joined: 17 Dec 2007 Posts: 64 Location: Victoria, BC, Canada
Hello SG_mf
On your DB Uptime system, all requests to get or update DLI database records are managed by the DLISAS address space and the DBRC address space. Competing "uptime" transactions for the same database record are managed so that the updates of transaction A are not overwritten by transaction B. That is called lock management.
Further, that DLISAS region has its own buffer pools where it keeps frequently referenced database records. There will be times when the contents on disk do not match what is in these buffers. If some other job tries to read the data directly from disk, it may not receive the most current contents. Imagine how that might play out in a banking application that is updating YOUR bank account.
Your DB Uptime system also performs lock management in conjunction with DB2 in cases where your online transactions also update DB2 tables.
When your DB Uptime system is down, your batch DLI update jobs each obtain exclusive access (I really hope they do, for your sake) to the database datasets, run, and then release the datasets for the next job.
When you convert your batch DLI update (and read only) jobs to BMPs, all of the DLI database reads/updates are managed by the DB Uptime system and it's DLISAS and DBRC address spaces.
This means that your formerly DLI batch jobs no longer need DD statements for the database datasets, or DFSMDA specified for the databases. They also do not need their own log datasets. This is handled by the DB Uptime region. Any calls to DB2 are managed as well.
If your BMP job abends, the DB Uptime region will ensure that any updates performed after the most recent checkpoint, to DLI or DB2, are backed out for consistency. More on checkpoints later.
All good so far.
To convert your DLI batch read only jobs, you need only update the mainline to handle an IOPCB as the first entry in the parm list. And update the PSB to specify COMPAT=YES.
To convert your DLI batch update jobs, you need to do the above, plus you need some means of performing checkpoint or extended checkpoint calls every few seconds.
You want to aim for a sweet spot where you checkpoint at least every 10 or 20 seconds, so as not to impede your online transactions, but not so often that you fill the DB uptime logs with checkpoint log records. Beware. If your batch job checkpoints at a rate of 10 or 20 per second, a sysprog will magically appear with violent intent and a sharp tongue.
And you need logic in the job so that if it abends, it can be restarted from the most recent checkpoint, reposition any input/output files to match the program state at the time of the most recent checkpoint, and then continue processing.
This is not a difficult conversion. I did it straight out of school decades ago when there were no vendor tools to assist.
Today there are vendor tools to help with checkpoint/restart and checkpoint pacing. An example is BMC Software Application Restart Control.
Now to answer your question.
>Please let us know, If we can run the DLI update jobs in DB uptime? If not, I would like to know the reason for the same.
If you have multiple IMS control regions (DB uptime) sharing the same database datasets using one IRLM and Block Level Data Sharing, then yes, there is a way, but you still have to code checkpoint/restart capability into your application programs. And that is 99% of the effort to convert them to BMPs. I am guessing you don't have IRLM and Block Level Data Sharing as that conversion is a far larger project than converting 100 jobs to BMPs.
Conversion to BMPs is not difficult. Once completed, you will no longer have the headaches of batch backout when a job fails. Or jobs running late and preventing your DB uptime region from starting-with huge business impact.
So stop wringing your hands and get on with the BMP conversion. If a wet -behind-the-ears newbie like me could do it, you can too!
Thanks a lot Gary for your detailed explanation. As per your suggestion, it's good to move with DLI to BMP conversion which we have already started to work. I was just curious to know the reason and I'm clear now.
Being a 'New user' is always good for learning new things !! Hope you will be promoted next year Thanks again