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

Doubt on checkpoint restart logic


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

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Wed Jan 04, 2012 4:43 pm
Reply with quote

Hi,

I have a cobol program using PS file (containing 500 records) and checkpoint restart logic. It got abended in the 100th record and when I restarted it got started from the beginning and went through fine. But my doubt was whether the IMS would not hold the RBA address of the PS file.
Moreover my checkpoint logic is a time based one, so wont it take from the abended record according to the time when it has abended?.

When I used a GSAM file it got resolved as I heard that IMS holds the RBA of the file and hence it was able to take from the abended record.

Please assist me.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 04, 2012 4:52 pm
Reply with quote

Quote:
Please assist me.


about what ?

IMS knows only about things under its control.
a dataset accessed ( VSAM, PS, ... ) thru MVS I/O is outside of IMS control
so any checkpoint/restart must be taken care of by the user.
that' all.
Back to top
View user's profile Send private message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Wed Jan 04, 2012 8:30 pm
Reply with quote

Hi,

Thanks for your reply

I would like to know two things

1. Is there any possibility to hold the position of PS file when we do a restart for that program ?.

2. Please let me know what is the difference between checkpoint restart logic on timebased and file based. Because as far as i know if its timebased it restarts from the time when it abended. Kindly correct me if i am wrong.
So only i asked if i process a PS file which has 500 records and has abended after 100 records whether it will restart based on the time it has abended so that it will process after the abended record
((ie) 101th record).
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jan 04, 2012 8:58 pm
Reply with quote

Hello,

To do what you want, the process would have to keep track (externally) of the record number in the ps file where a restart is to begin. This is not something you should "invent" for your process. Checkpoint/restart is usually standard for an entire system or major application - it is not re-invented for each batch process.

If there is no standard chackpoint/restart method in place, suggest it not be used for this process.
Back to top
View user's profile Send private message
Soumik Das

New User


Joined: 06 Aug 2011
Posts: 25
Location: India

PostPosted: Wed Jan 04, 2012 9:08 pm
Reply with quote

If you want to know more about checkpoints you can follow this link.

The rest is up to you to figure out as to how you can apply this information.
Back to top
View user's profile Send private message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Wed Jan 04, 2012 9:08 pm
Reply with quote

ok. i understood that i need to keep track the record number of the PS file during restart is done. I think i need to put the record in the checkpoint save area to keep track of it then.

I am not trying to invent here but if i use GSAM file instead its working out correctly. But was curious to know why it was not working for PS file instead.
Back to top
View user's profile Send private message
Soumik Das

New User


Joined: 06 Aug 2011
Posts: 25
Location: India

PostPosted: Wed Jan 04, 2012 9:17 pm
Reply with quote

Quote:
I am not trying to invent here but if i use GSAM file instead its working out correctly. But was curious to know why it was not working for PS file instead.


Actually it is much more easier to understand the difference than you are making it to be.

Compare the difference in between way you write to the PS and ISRT into the GSAM. Check for the parameters you pass during the IMS call. That should clarify your doubts.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jan 04, 2012 9:19 pm
Reply with quote

Hello,

Quote:
I am not trying to invent here but if i use GSAM file instead its working out correctly.
As the "thing" that works uses GSAM and the "thing" that does not uses your ps, you would have to "invent" something to work with your ps. . .

And i believe this is not a good investment of time/effort.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 04, 2012 10:09 pm
Reply with quote

Quote:
I am not trying to invent here but if i use GSAM file instead its working out correctly. But was curious to know why it was not working for PS file instead.

/REPEAT ON
because GSAM databases are managed by IMS
( and their checkpoint/restart will be automatically taken care of by IMS )
PS are not, so IMS knows nothing about them so cannot act on them

while it might be simple to reposition an input file by reading and skipping the appropriate number of records
it is not so for output files, with the risk of having duplicate records
Back to top
View user's profile Send private message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Thu Jan 05, 2012 12:13 pm
Reply with quote

Thanks a lot for your guidance.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Mon Jan 09, 2012 3:52 pm
Reply with quote

PS, not a very zOS related term though, is a QSAM file. In basic sense it uses Queued Sequential Access Method and that's why the name. When this method is used, a queue is formed of input data blocks that are awaiting processing or of output data blocks that have been processed and are awaiting transfer to auxiliary storage or to an output device - said that, as Enrico has mentioned about it - IMS did not get involved in it.

On the other hand, GSAM, Generalized Sequential Access Method, is a database access method providing accessing support for simple physical sequential data sets, such as tape files, SYSIN, SYSOUT, and other files that are not hierarchic in nature and makes them available only in BMP and Batch and thus provides the capabilities to use IMS logs.

This might a be intresting read in the cotext of this topic.
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 Finding faulty logic Subscript out of... COBOL Programming 5
This topic is locked: you cannot edit posts or make replies. Need assistance in job scheduling logic. Mainframe Interview Questions 2
No new posts Rexx Logic error while adding seperat... CLIST & REXX 3
No new posts PL/1 Callback address logic in z/OS C... PL/I & Assembler 1
No new posts Doubt about pl/1 (job offer) General Talk & Fun Stuff 5
Search our Forums:

Back to Top