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
 

 

At the end of ims cobol prog it is STOP RUN or GOBACK
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
shivanag_2

New User


Joined: 08 Mar 2005
Posts: 1
Location: banglore

PostPosted: Fri Feb 10, 2006 1:48 pm    Post subject:
Reply with quote

i need to know what you will type at the end of any ims cobol program it is either stop run or goback
i am shivanag from hyderabad
Back to top
View user's profile Send private message

prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Fri Feb 10, 2006 2:18 pm    Post subject:
Reply with quote

Hi

Goback

T & R
Prabs
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Fri Feb 10, 2006 6:58 pm    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

Coding STOP RUN or GOBACK would not depend on whether it is an IMS program or not.

It depends where it is being coded, whether in a MAIN Program or SUB PROGRAM.

Check out this from manuals....

Quote:
The GOBACK statement functions like the EXIT PROGRAM statement when it is coded as part of a called program and like the STOP RUN statement when coded in a main program.
The GOBACK statement specifies the logical end of a called program.


Regards,

Priyesh.
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Sat Feb 11, 2006 3:31 pm    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

priyesh.agrawal wrote:
Coding STOP RUN or GOBACK would not depend on whether it is an IMS program or not.

It depends where it is being coded, whether in a MAIN Program or SUB PROGRAM.

Check out this from manuals....

Quote:
The GOBACK statement functions like the EXIT PROGRAM statement when it is coded as part of a called program and like the STOP RUN statement when coded in a main program.
The GOBACK statement specifies the logical end of a called program.


Regards,

Priyesh.



hi Priyesh,

it does depend on coding STOP RUN or GOBACK for IMS program. For IMS COBOL program we must code GOBACK instead of STOP RUN. only then all your resources acquired from IMS by the ENTRY statement will be released back to IMS.

suggestions welcomed.

gowtham
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Feb 15, 2006 12:12 pm    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

Thank You Gowtham, for the corrections... I didn't know that... & misguided as I did quite often... icon_lol.gif

Regards,

Priyesh.
Back to top
View user's profile Send private message
Ajeevlal

New User


Joined: 19 Feb 2005
Posts: 9
Location: Chennai

PostPosted: Fri Feb 17, 2006 9:05 am    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

U are correct Gowtham and ims cobol program acts as a sub program to IMS and hence we should use GOBACK to return the control to Main program (Which is IMS system)
Back to top
View user's profile Send private message
venkat1111_a1

New User


Joined: 14 Feb 2006
Posts: 8

PostPosted: Fri Feb 17, 2006 9:15 am    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

ya , we write STOP RUN. at the end of the cobol prog.
Its manditary that every program ends with stop run, inspite of number of para s that we have used.If dont use STOP RUN the program compiler that is IGYCRCTL will through the error.

venkat
vijayawada
now in hyd.
Back to top
View user's profile Send private message
Ajeevlal

New User


Joined: 19 Feb 2005
Posts: 9
Location: Chennai

PostPosted: Sat Feb 18, 2006 7:50 am    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

Hi Venkat,

i belive we use different compilers for normal COBOL program and IMS-COBOL program. So IMS-COBOL program should always be terminated with GO BACK and a normal COBOL prg shoud be terminated with STOP RUN.

Please correct me if i am wrong...
Back to top
View user's profile Send private message
parikshit

New User


Joined: 29 Apr 2007
Posts: 2
Location: Chennai

PostPosted: Fri May 11, 2007 6:55 pm    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

IMS cobol pgm should be coded with GOBACK as above said it results in logical ending , also it results in proper closing of log files and VSAM files and deallocation of OS resources.
If STOP RUN it result in forced termaination of pgm, which i believe results in ABEND
Back to top
View user's profile Send private message
Mahendran3784

New User


Joined: 04 May 2007
Posts: 20
Location: INDIA

PostPosted: Tue May 29, 2007 2:17 pm    Post subject: Question
Reply with quote

With the use ENTRY statements, what do you mean acquiring resources?
Does it mean that those DBs will not be accessed by any other programs?

Mahendran B
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Tue May 29, 2007 6:42 pm    Post subject:
Reply with quote

IMS COBOL or IMS PL1 program are always Sub program to DLI Main program, and ENTRY statement gets control from DLI.
All the PCBs are loaded, DB pointers are setup, etc

Quote:
Does it mean that those DBs will not be accessed by any other programs?

It doesnt mean that those DBs will be locked.

Mahendran B - When starting a new discussion, better to post new topic rather than chaining in some other topic.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Tue May 29, 2007 9:26 pm    Post subject:
Reply with quote

I love it when IBM publishes information on the net icon_wink.gif

this one and this one for example. There's a sticky in the forum leading you to IMS information icon_idea.gif
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 2:05 am    Post subject:
Reply with quote

Hello,

FWIW (For what it's worth), many sites i've worked with/supported will not allow STOP RUN in any production code.
Back to top
View user's profile Send private message
Libu Thomas

New User


Joined: 01 Jan 2007
Posts: 6
Location: India

PostPosted: Wed May 30, 2007 1:41 pm    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

Check the version of IMS on which you are working. If the version is greater than 7, then both stop run and goback are valid and both do the same functionality if it is ur main program. if it is ur subprogram, use goback or exit program command.
Back to top
View user's profile Send private message
Karthi-acp

New User


Joined: 21 Apr 2007
Posts: 5
Location: India

PostPosted: Wed Jun 13, 2007 11:04 pm    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

hello,
IMS programs run under the control of batch initilization module DFSRRC00.If you code Stop Run the control is return to OS instead of DFSRRC00. So code GOBACK to give the control back to the called module its DFSRRC00.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Jun 14, 2007 1:05 am    Post subject: Re: At the end of ims cobol prog it is STOP RUN or GOBACK
Reply with quote

Always use GOBACK!
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Thu Jun 14, 2007 1:14 am    Post subject: [Closed]At the end of ims cobol prog it is STOP RUN or GOBA
Reply with quote

Quote:
Fri Feb 10, 2006 1:18 pm


This item was posted and, however we answered it, TS did not react at all. IMHO we should not pay any attention to it anymore.
Back to top
View user's profile Send private message
Karthigaiselvan

New User


Joined: 11 Dec 2006
Posts: 35
Location: India

PostPosted: Wed Aug 29, 2007 11:32 pm    Post subject: Reply to: At the end of ims cobol prog it is STOP RUN or GOB
Reply with quote

Hi,

My understanding is that irrespective of IMS COBOL or a normal COBOL program, using GO BACK is good and this will give a chance to OS to release all the resources allocated to the program.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Aug 29, 2007 11:35 pm    Post subject:
Reply with quote

The answer is simple - ALWAYS-ALWAYS-ALWAYS use GOBACK. Does any version of COBOL support STOP RUN anymore - if it does, it shouldn't. GOBACK allows you to enjoy the privilege of becoming someone's called program.
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 Aug 29, 2007 11:54 pm    Post subject:
Reply with quote

Hello,

While the compiler still supports STOP RUN, many organizations do not allow it to be used. One of the things checked in the promotion process is that GOBACK is used and there is no STOP RUN in the code.

As many others have said - use GOBACK.
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 -> IMS DB/DC All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


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