View previous topic :: View next topic
|
Author |
Message |
shivanag_2
New User
Joined: 08 Mar 2005 Posts: 1 Location: banglore
|
|
|
|
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 |
|
|
prabs2006
Active User
Joined: 12 Jan 2006 Posts: 103
|
|
|
|
Hi
Goback
T & R
Prabs |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Thank You Gowtham, for the corrections... I didn't know that... & misguided as I did quite often...
Regards,
Priyesh. |
|
Back to top |
|
|
Ajeevlal
New User
Joined: 19 Feb 2005 Posts: 9 Location: Chennai
|
|
|
|
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 |
|
|
venkat1111_a1
New User
Joined: 14 Feb 2006 Posts: 8
|
|
|
|
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 |
|
|
Ajeevlal
New User
Joined: 19 Feb 2005 Posts: 9 Location: Chennai
|
|
|
|
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 |
|
|
parikshit
New User
Joined: 29 Apr 2007 Posts: 2 Location: Chennai
|
|
|
|
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 |
|
|
Mahendran3784
New User
Joined: 04 May 2007 Posts: 20 Location: INDIA
|
|
|
|
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 |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
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 |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
I love it when IBM publishes information on the net
this one and this one for example. There's a sticky in the forum leading you to IMS information |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Libu Thomas
New User
Joined: 01 Jan 2007 Posts: 6 Location: India
|
|
|
|
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 |
|
|
Karthi-acp
New User
Joined: 21 Apr 2007 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Always use GOBACK! |
|
Back to top |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
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 |
|
|
Karthigaiselvan
New User
Joined: 11 Dec 2006 Posts: 35 Location: India
|
|
|
|
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 |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
Yeah, I'm with Dick on this one. We don't allow STOP RUN anywhere in our code, we use GOBACK for everything. |
|
Back to top |
|
|
|