Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can anybody tell me what is retsart logic in cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
devidas-patil

New User


Joined: 08 Jan 2007
Posts: 54
Location: pune

PostPosted: Wed May 30, 2007 9:56 am    Post subject: Can anybody tell me what is retsart logic in cobol
Reply with quote

Hi
please can anybody tell me the restart logic in cobol

i just got this question in interview and i dont know about what he asekd me but one thing is sure he asked me the restar logic in cobol
Back to top
View user's profile Send private message

Raphael Bacay

New User


Joined: 04 May 2007
Posts: 58
Location: Manila, Philippines

PostPosted: Wed May 30, 2007 10:44 am    Post subject:
Reply with quote

It is coded in the job card and I think it means to restart a job
from the step specified on the job card in case of an abend.

Why don't you surf around and look it up?
=)
Back to top
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Wed May 30, 2007 12:02 pm    Post subject:
Reply with quote

In normal COBOL programs there is nothing like restart logic.

Either restart in done through JCL or in IMS COBOL program.

In JCL you can specify the step name which you want to restart in job card. If you are using cataloged procedure, then specify procname.stepname to restart.

In Cobol IMS program you can use, the checkpoint logic to restart a program.

CALL 'CBLTDLI' USING CHKP ...... to set check point

And at begining of program (i.e. b4 using any CHKP call) issue a RESTART call.
CALL 'CBLTDLI' USING XRST... to restart the program in case of any abends
Back to top
View user's profile Send private message
kussu
Warnings : 1

New User


Joined: 16 May 2007
Posts: 33
Location: India

PostPosted: Wed May 30, 2007 8:44 pm    Post subject: Re: Can anybody tell me what is retsart logic in cobol
Reply with quote

As per my knowledge, the interviewer is asking about general logic used to restart from a particular record of the file in Cobol.

In general we can explain this case as:-

Let us say if a file[which is a DB2 table] contains 100 records which needs to be updated,

This restart logic will work as:-

For hundred records , lets say we will commit the modifications for each and every 10 records.

While updating the first 10 records, if 10th record got abended, that record will be moved to the restart file [Which we declared for this purpose].

And the record present in the restart file will be compared with the input file, until these two are matching

when the matching record found, the program will start updations from that record .

Like this it will work..!

This is as per my knowledge....Let me know if I am wrong

Thanks
Kussu
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed May 30, 2007 8:53 pm    Post subject:
Reply with quote

Hello,

It is quite common for a long-running batch cobol program to have restart logic built in.

The restart logic in the cobol code is syncronized with database checkpoints and re-creating/re-positioning sequential output files and reports.

Usually, restarts are performed by "logical units of work" (LUW) rather than at each specific input record.
Back to top
View user's profile Send private message
Ace

New User


Joined: 03 May 2007
Posts: 14
Location: Delhi

PostPosted: Wed May 30, 2007 11:27 pm    Post subject:
Reply with quote

Hi,

The RESTART LOGIC in a cobol program is to restart your operation from where the last abend happened in the program

For e.g. If you have 2 files and you r reading 1 file and writing into the another file and say at 30th record, any abend happens then that record will be moved to BISRESTARTER (dataset in Unisys Mainframe) and when you restart executing your program it will get the record in the BISRESTARTER and you have to position the pointer to your 30th record and will start reading from that point and write that to output file.
Back to top
View user's profile Send private message
anv2005

New User


Joined: 14 Jul 2005
Posts: 44
Location: US

PostPosted: Thu May 31, 2007 12:38 am    Post subject:
Reply with quote

Hi Ace,

You wrote:
Quote:
The RESTART LOGIC in a cobol program is to restart your operation from where the last abend happened in the program


I would also add that the RESTART logic in any programs must include logic to re-process any failed unit of work. The failed unit of work is usually completes with DB2 ROLLBACK, Web MQ MQBACK or RRS SRRBACK call.

Any application program must ensure that its resources, i.e. working-storage contents, sequential file positions and random file updates must be in sync with database managed resources at all times.

Regards,
Alex.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us