Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us