Sample IMS DB Program with Checkpoint / Restart Instructions



IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)

Sample IMS DB Program with Checkpoint / Restart Instructions

Postby LeShe » Wed Jul 11, 2012 8:22 am

Hello,

This is LeShe and I need your guidance when it comes in doing checkpoint / restart for IMS DB Program (with update). Basically, I need to work on it as this is urgently needed by our team for training purposes. Since I already forgot on how to code this from scratch, can you guide me on the following items:

Overview:
I have 2 GSAM Files (1 as input and the other as output, both have 120 bytes in length) and 1 DB with 4 segments. Currently, our sample program can already issue replace/insert/delete for a specific segment which is dictated by the input file and can already write to the output file successfully as well. I want to have a checkpoint for every 3 records read.

Items needed in code details:
1) Checkpoint instruction (paragraph) to save the record read as well as the output written. (I remember that this is issued after a full processing of a given record. I already forgot the syntax for this.)
2) Restart instruction (paragraph) to move the save data from the latest checkpoint. (I remember that this should be done in immediately (normally in INITIALIZATION) before any other processing of the program. I already forgot the syntax for this).
3) Checking if the program needs a restart or not. (I remember that I can check the restart work area on this if spaces or not, but I forgot on how to identify if the field is for restart work area).
4) Checking if the program needs to issue a checkpoint or not. (I remember that we are using computation with remainder on this, kindly guide me on this)

Kindly let me know your inputs.

Thank you very much in advance,
LeShe
LeShe
 
Posts: 3
Joined: Tue Jul 10, 2012 1:20 pm
Location: In your mind
Has thanked: 2 times
Been thanked: 0 time

Re: Sample IMS DB Program with Checkpoint / Restart Instruct

Postby NicC » Wed Jul 11, 2012 12:41 pm

Have you asked around for similar programs in your establishment? Have you referred to your notes when you originally learnt this (I have notes going back to 1973 when I started in IT). Have you refered to the manuals - use the contents and index to dip into the manua at the relevant places. If you need it urgently then hire a consultant. We do not do urgent - in fact having an urgent requirement tends to make some contributors ignore the topic.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Sample IMS DB Program with Checkpoint / Restart Instruct

Postby LeShe » Wed Jul 11, 2012 12:54 pm

Hello Nic,

I lost already the notes I have as well as the programs I made back then. Also, I am the only one who has knowledge in our team and I do not have manuals and programs to rely with. Right now, I am just referring to the web but have not seen any detailed codes that can satisfy our requirement. If you could help, I will truly appreciate it.

Thanks in advance,
LeShe
LeShe
 
Posts: 3
Joined: Tue Jul 10, 2012 1:20 pm
Location: In your mind
Has thanked: 2 times
Been thanked: 0 time

Re: Sample IMS DB Program with Checkpoint / Restart Instruct

Postby NicC » Wed Jul 11, 2012 5:46 pm

The manuals are available on the web.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

These users thanked the author NicC for the post:
imsfan (Wed Aug 08, 2012 10:06 am)
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Sample IMS DB Program with Checkpoint / Restart Instruct

Postby DFSHDC40 » Thu Jul 12, 2012 3:43 am

It's a bit of a concern that as "the only one who has knowledge in our team "....... and you dont know where to find basic information
- as NicC says the manuals are on the t'Interweb... certainly not good for the future of IMS applications
While IMS doesnt do drag'n'drop it does fly ... all the way to the moon! [or should that be !!!!!!!!!... nope it's not urgent ]
If the code hasn't been changed, why is the LKED date today?
User avatar
DFSHDC40
 
Posts: 41
Joined: Sat Oct 16, 2010 4:16 pm
Location: IMS.SDFSRESL
Has thanked: 0 time
Been thanked: 0 time

Re: Sample IMS DB Program with Checkpoint / Restart Instruct

Postby LeShe » Thu Jul 12, 2012 10:34 am

Thanks.....
LeShe
 
Posts: 3
Joined: Tue Jul 10, 2012 1:20 pm
Location: In your mind
Has thanked: 2 times
Been thanked: 0 time

Re: Sample IMS DB Program with Checkpoint / Restart Instruct

Postby Ed Goodman » Thu Jul 12, 2012 8:19 pm

When you find your shop's sample code, or a working program from which to build one, watch out for a few things.

- Learn if the ckpt is taken before or after the read of the driving file/database
This is important for knowing what to do during the restart. If the ckpt is before the read, then the restart has to read the next one. If it's after the read, then you have to save the record/segment and start with that one.
Our standard here is to do a read before entering into the main loop, then take the checkpoint at the bottom of the loop. That way, our restart can just go to the main loop.

- Make certain everything you need is in the areas being saved.

- Make certain the checkpoint area is NOT in one of the save areas.

- Make certain the XRST and CKPT save areas are in the same sequence

- If you are doing a sequential read of a database as the driver, make certain that you reposition after a ckpt call.
Taking a checkpoint basically randomizes your position. So you have to go back to where you were with a GU call on the driver database.

- Take the time to set up a check for the longest save area each time the program runs. (Don't hard code it)

These users thanked the author Ed Goodman for the post:
LeShe (Fri Jul 13, 2012 6:38 am)
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: Sample IMS DB Program with Checkpoint / Restart Instruct

Postby dick scherrer » Thu Jul 12, 2012 11:32 pm

Hello,

FWIW - none of my clients currently implement anything new with checkpoint/restart in any database applications. With the speed of the new cpus and dasd, most jobs run quickly enough that restarting from the beginning is more than sufficient. Also, the number of abends is quite low (read proactically none). It is much easier and less problematic to restart from the beginning rather than jumping thru hoops to get things "repositioned" for a restart "in the middle".

There is also the consideration of any sequential data that is generated (files, reports, etc). If a checkpoint/restart is done, all of these must be recreated from the beginning or the partial output has to be "continued". Continuation is quite difficult for outputs that have cumulative processes in them.

Many is the nightmare of the restart that wasn't done quite correctly and not discovered until some number of subsequent processes have been run.

Again - fwiw.
Hope this helps,
d.sch.

These users thanked the author dick scherrer for the post:
LeShe (Fri Jul 13, 2012 6:38 am)
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Sample IMS DB Program with Checkpoint / Restart Instruct

Postby Anuj Dhawan » Fri Jul 13, 2012 12:52 pm

Apart from what has been told, I believe you'd like to keep this link handy too: http://publibz.boulder.ibm.com/cgi-bin/ ... &rank=RANK
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times


Return to IMS DB/DC

 


  • Related topics
    Replies
    Views
    Last post