IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Issue a checkpoint in an IMS program


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Fri Mar 28, 2008 3:26 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Mar 28, 2008 8:48 pm
Reply with quote

Hello,

Please explain why you need to issue a checkpoint after a read.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Fri Mar 28, 2008 9:16 pm
Reply with quote

To do checkpoint issue CKPT call in your IMS BMP program.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Fri Mar 28, 2008 10:49 pm
Reply with quote

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
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Mon Mar 31, 2008 9:43 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Mon Mar 31, 2008 7:25 pm
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Mon Mar 31, 2008 8:14 pm
Reply with quote

Why not take a checkpoint after you read a group of records?
Back to top
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Tue Apr 01, 2008 10:32 am
Reply with quote

I will explain the scenario...... icon_smile.gif

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. icon_biggrin.gif
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Tue Apr 01, 2008 3:58 pm
Reply with quote

jithumohan wrote:
I will explain the scenario...... icon_smile.gif

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. icon_biggrin.gif



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
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Tue Apr 01, 2008 4:06 pm
Reply with quote

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
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Apr 01, 2008 5:35 pm
Reply with quote

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
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Tue Apr 01, 2008 5:52 pm
Reply with quote

Could you please explain more?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Apr 01, 2008 6:08 pm
Reply with quote

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
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Tue Apr 01, 2008 6:13 pm
Reply with quote

"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
View user's profile Send private message
pvaithee

New User


Joined: 20 Jan 2008
Posts: 1
Location: Chennai

PostPosted: Sun Apr 27, 2008 11:59 am
Reply with quote

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
View user's profile Send private message
vijaynagabhairava

New User


Joined: 13 Apr 2008
Posts: 3
Location: India

PostPosted: Sun May 04, 2008 10:18 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts XML Generate issue COBOL Programming 0
No new posts How to Login in to cics region and is... CICS 9
No new posts Error to invoke MPP program through B... IMS DB/DC 3
No new posts Using API Gateway from CICS program CICS 0
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top