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
 
Is there any option of RESTART in COBOL

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

New User


Joined: 06 May 2005
Posts: 20
Location: Bangalore

PostPosted: Thu Sep 01, 2005 7:21 pm    Post subject: Is there any option of RESTART in COBOL
Reply with quote

Hi all,

Is there any option of RESTART in COBOL?

Please clarify me

Thanks in advance
Back to top
View user's profile Send private message

Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Thu Sep 01, 2005 7:26 pm    Post subject: Re: RESTART
Reply with quote

Hi Praneethgoku,

Please explain your requirement.

Regards
Rupesh
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Thu Sep 01, 2005 7:57 pm    Post subject:
Reply with quote

Restart what?
Back to top
View user's profile Send private message
praneethgokul

New User


Joined: 06 May 2005
Posts: 20
Location: Bangalore

PostPosted: Fri Sep 02, 2005 4:12 pm    Post subject: Re: RESTART
Reply with quote

hi everybody

Suppose I have a file of 1000 records. While reading it if it has an error at 95th record. Then I want to read the file again from 96th.
I dont want to read it again from 1st record. Is there any chance?

Please clarify me
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Fri Sep 02, 2005 4:28 pm    Post subject:
Reply with quote

Assuming that you are reading vsam file records.
Implement restart logic so that it will skip all the records till the error record and read from 96th record.
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Fri Sep 02, 2005 4:35 pm    Post subject: Re: RESTART
Reply with quote

Hi Praneethgokul,

I guess there is no Restart command as you want in COBOL. You have to implement logic in Cobol program.

Regards
Rupesh
Back to top
View user's profile Send private message
michaelraj

New User


Joined: 01 Sep 2005
Posts: 43
Location: Bangalore

PostPosted: Fri Sep 02, 2005 4:40 pm    Post subject:
Reply with quote

Hi Praneeth,

There is no such option like Restart in cobol. If at all required we can have database variable like db_count which indicates how many records read and it will updates as soon as it read a record. If you got an error, then you can retrieve the value from DB and from there you can read again.

If at all you are reading and writing into another file, then you have to read the last record and from there you have to point to next record with START in read file and then proceed further.

I think this is the only possible way, if there are other ways let me know.

Regards,
Mike.
Back to top
View user's profile Send private message
michaelraj

New User


Joined: 01 Sep 2005
Posts: 43
Location: Bangalore

PostPosted: Fri Sep 02, 2005 4:45 pm    Post subject:
Reply with quote

Hi praneeth,

We need Database variable if the program is abended and then again if you want to restart and perform at that point while reading the file. If the program is not abended then working storage variable is enough.
Regards,
Mike.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Sep 06, 2005 12:14 am    Post subject:
Reply with quote

Hi Praneeth,

Have you looked in the manuals? There are 2 that you should search as a matter of course: The Reference manual and the Pgmr's Guide.

I looked and found more info than I care to read. Perhaps you will because you have the problem.

If you are not aware oof it, the manuals here at this site can be found by clicking "manuals" at the very to of the page. Click the manual that applies, scroll down to the index, click then scroll down to the "R"a and look for something like "restart" or "restarting" and get to work.

P.S. Checkpoint/Restart has been around for a looooooong time. By the way, this is a hint. More info can be found using "Checkpoint" as a search arg.
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
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
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

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