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
Sample IMS DB Program with Checkpoint / Restart Instructions
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Sample IMS DB Program with Checkpoint / Restart Instruct
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
Regards
Nic
-
- Posts: 3
- Joined: Tue Jul 10, 2012 1:20 pm
- Skillset: None
- Referer: thru Google
- Location: In your mind
Re: Sample IMS DB Program with Checkpoint / Restart Instruct
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
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
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Sample IMS DB Program with Checkpoint / Restart Instruct
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
Regards
Nic
- DFSHDC40
- Posts: 41
- Joined: Sat Oct 16, 2010 4:16 pm
- Skillset: MVS IMS DB2 JCL ISPF REXX ... and all the glue that keeps them together
- Referer: internet
- Location: IMS.SDFSRESL
Re: Sample IMS DB Program with Checkpoint / Restart Instruct
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 ]
- 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?
-
- Posts: 341
- Joined: Thu Feb 24, 2011 12:05 am
- Skillset: 30 years on IBM mainframes
- Referer: Searched for Frank Yeager
Re: Sample IMS DB Program with Checkpoint / Restart Instruct
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)
- 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)
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: Sample IMS DB Program with Checkpoint / Restart Instruct
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.
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.
d.sch.
-
- Posts: 272
- Joined: Mon Feb 25, 2008 3:53 am
- Skillset: None
- Referer: Google
- Location: Mumbai, India
Re: Sample IMS DB Program with Checkpoint / Restart Instruct
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
-
- Similar Topics
- Replies
- Views
- Last post
-
- 0
- 2322
-
by VJSIRI
View the latest post
Fri Nov 13, 2020 1:53 am
-
- 6
- 2534
-
by sergeyken
View the latest post
Wed Nov 24, 2021 11:26 pm
-
-
Restart a program that has only GSAM output files
by RajaniSiddineni » Thu Jul 22, 2021 7:48 pm » in IMS DB/DC - 1
- 3978
-
by Isakshields
View the latest post
Mon Aug 09, 2021 5:57 pm
-
-
- 2
- 2975
-
by willy jensen
View the latest post
Wed Jan 04, 2023 2:17 pm
-
-
Calling Java program on UNIX/USS from a COBOL CICS program?
by zbius » Tue Nov 05, 2024 2:37 pm » in IBM Cobol - 2
- 2589
-
by zbius
View the latest post
Wed Nov 06, 2024 6:02 pm
-