View previous topic :: View next topic
|
Author |
Message |
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
Hi
Can anybody help me for the following.
I need to issue a checkpoint in an IMS program for the previous record which is read from a GSAM file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Please explain why you need to issue a checkpoint after a read. |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
To do checkpoint issue CKPT call in your IMS BMP program. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
Check point is usually associated with RESTART, is this what your concern is? As asked
Quote: |
why you need to issue a checkpoint after a read. |
is not a usual scenario, unless I misunderstood. |
|
Back to top |
|
|
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
Because the program should handle a number of records in the input file at a time.
The program need to be restarted from the last record of the previous group even if it starts reading the next group. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Please do some more research about how checkpoint/restart works or talk with your dba(s).
If i understand your situation, issuing a checkpoint after some number of reads will not cause a re-run to start at the "read" you want. |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Why not take a checkpoint after you read a group of records? |
|
Back to top |
|
|
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
I will explain the scenario......
Let following are the records in the input file (Lrecl = 4500)
A1, B11, B12, B13, A2, B22, B23, B24, A3..
Suppose the program abended at the record B12. I need to restart the job from the record A1.
Similary if the program abended at B23, it need to be started from A2.
For this I need to issue checkpoint after processing B13 and B24 respectively. Please note that the number of records in a group is not fixed (here the number of B). So we cannot predict whether B13 is the last record in the first group and similarly B24 is the last record in second group.
I suppose now you understood the situation. |
|
Back to top |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
jithumohan wrote: |
I will explain the scenario......
Let following are the records in the input file (Lrecl = 4500)
A1, B11, B12, B13, A2, B22, B23, B24, A3..
Suppose the program abended at the record B12. I need to restart the job from the record A1.
Similary if the program abended at B23, it need to be started from A2.
For this I need to issue checkpoint after processing B13 and B24 respectively. Please note that the number of records in a group is not fixed (here the number of B). So we cannot predict whether B13 is the last record in the first group and similarly B24 is the last record in second group.
I suppose now you understood the situation. |
can you please try out this logic?
issue a chkp call after reading the first record of every group. hence when you read A2, you can issue a chkp call.. similarly after reading A3, you can issue a chkp call and so on....
the above logic is as per my understanding that, the job has to be restarted from the first record of the group.
please let me know for any queries or correct me if i am incorrect.
kind regards,
gowtham |
|
Back to top |
|
|
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
Thanks for the help.. but the issue is still there. Because ur logic is for issuing checkpoint after every 'A' record comes.
I need to issue checkpoint before reading A2, A3 etc... ie just after the processing of B13, B24 etc.
As per ur logic the my requirement will fail. coz we have already read the first record from the next group (ie A records). |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Is this message spullied with each CKPT call? If so you can use the last -/- 1 ID or timestamp to XRST and our suggestion can work. |
|
Back to top |
|
|
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
Could you please explain more? |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
After a CKPT call IMS supplies you with a message containing CKPT-ID. After you reach a new group take a checkpoint. If you need to restart do the restart with the CKPT-ID supplied in the message before the last ID. Follow this and explore. |
|
Back to top |
|
|
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
"If you need to restart do the restart with the CKPT-ID supplied in the message before the last ID."
Please think what will be the value for last ID here. I think it will be checkpoint issued on 'A' record. Right? In this case same issue will be there that I told you early. We cannot read the record A from the input file after issuing check point even if it is abended at it corresponding B records. Right? |
|
Back to top |
|
|
pvaithee
New User
Joined: 20 Jan 2008 Posts: 1 Location: Chennai
|
|
|
|
Hi,
If you are not sure of the last record of the group it is not possible to issue a checkpoint exactly for that record.
But u can do onething, after reading the first record of the next group issue a checkpoint and put the data of the record read in a save area. in case if the job abend now in B23 the pointer will be in A2. Now while restarting, restore the value of the A2 from save area and give a get next call to the GSAM file which will start form the next record i.e B22(in this case). But in this case u cannot skip this group if u need, so always have a bypass logic for the program.
As of my understanding it is not possible to issue check point for the group without reading the next group record.
Thanks... |
|
Back to top |
|
|
vijaynagabhairava
New User
Joined: 13 Apr 2008 Posts: 3 Location: India
|
|
|
|
Hi,
Try the following logic.
"Issue a checkpoint after reading every B record and save the checkpoint ID in a working storage variable. When you encounter an A type record you just display the value in the variable. Now when the program abends, you just restart the program from the last checkpoint ID displayed in the spool".
I believe it will work for you. If you still persisting with the problem please let me know. |
|
Back to top |
|
|
|