Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : All available storage is assigned to the job or jobstep, If REGION is coded 0K or 0M

Google
 
Web mainframegurukul.com

is multiple STOP RUN are valid?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL
  View previous topic :: View next topic  
Author Message
sekhar19
Member


Joined: 17 Jun 2009
Posts: 5

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Jul 09, 2009 2:23 pm    Post subject: is multiple STOP RUN are valid? Reply with quote

1. Coding Multiple STOP RUN is valid?
if yes which will take top precedence?
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 975

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Jul 09, 2009 2:42 pm    Post subject: Reply with quote

yes,
which ever is executed first.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
sekhar19
Member


Joined: 17 Jun 2009
Posts: 5

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Jul 09, 2009 2:56 pm    Post subject: statements after the STOP RUN is valid?? Reply with quote

the statements coded after the STOP RUN, is valid???
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Natarajan
Moderator


Joined: 10 Oct 2008
Posts: 537
Location: chennai

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Jul 09, 2009 3:41 pm    Post subject: Reply with quote

Try it once... Very Happy
_________________
Natarajan
Chennai
Back to top
View user's profile Send private message Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
arcvns
Member


Joined: 30 May 2009
Posts: 28
Location: Chennai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Jul 09, 2009 6:38 pm    Post subject: Reply with quote

Quote:

the statements coded after the STOP RUN, is valid???
Only if the same is "valid" when coded before STOP RUN Very Happy
_________________
Arun
Back to top
View user's profile Send private message Yahoo Messenger
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
arunaa27
Member


Joined: 08 Jul 2009
Posts: 2
Location: Bloomington,IL,USA

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jul 10, 2009 3:10 am    Post subject: Reply with quote

I never tried this before. But, after the first STOP RUN executed, there will be no statements executed. But, DO NOT USE STOP RUN in your COBOL coding.... IT IS NOT ADVISABLE... Instead of this, you can use GOBACK.
_________________
Arun
Back to top
View user's profile Send private message Yahoo Messenger
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Natarajan
Moderator


Joined: 10 Oct 2008
Posts: 537
Location: chennai

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jul 10, 2009 10:24 am    Post subject: STOPRUN vs GOBACK Reply with quote

arunaa27 wrote:
But, DO NOT USE STOP RUN in your COBOL coding.... IT IS NOT ADVISABLE... Instead of this, you can use GOBACK.



Why are suggesting GOBACK instead of STOP RUN.
Are you talking about COBOL CICS programs?
_________________
Natarajan
Chennai
Back to top
View user's profile Send private message Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 975

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jul 10, 2009 12:38 pm    Post subject: Reply with quote

If you use STOP RUN in a CALLed module of a Batch Rununit, the rununit will stop.
that is why usage of GOBACK is always perfered.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Natarajan
Moderator


Joined: 10 Oct 2008
Posts: 537
Location: chennai

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jul 10, 2009 2:07 pm    Post subject: Reply with quote

Yes dick you are correct. I agree with your statement.

Arun is giving open statement - ' DONT USE STOP RUN IN COBOL programs'.
Not specfiied called programs, cics programs or normal cobol programs.
_________________
Natarajan
Chennai
Back to top
View user's profile Send private message Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 975

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
1 salutes

PostPosted: Fri Jul 10, 2009 2:38 pm    Post subject: Reply with quote

I agree with Arun: STOP RUN is an old instruction from back in the days when we did not code modularly. you can code GOBACK instead of STOP RUN anywhere. It is considered good practice now-a-days not to use STOP RUN.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Natarajan
Moderator


Joined: 10 Oct 2008
Posts: 537
Location: chennai

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jul 10, 2009 9:17 pm    Post subject: Reply with quote

Is there any specific reason for suggesting GOBACK instead of STOP RUN , even in normal cobol programs ( i am not talking about sub programs, cics programs )
_________________
Natarajan
Chennai
Back to top
View user's profile Send private message Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 975

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jul 10, 2009 10:36 pm    Post subject: Reply with quote

they can never be CALLed.

main modules coded with GOBACK, that acquire their input and output from other than linkage, could be used as submodules.

a lot easier to just always use GOBACK, and not rely on the coder to make the differentiation;
looking thru these forums and experience in the field has lead me and others to insist on GOBACK.
Just one less problem to deal with.

Besides, how many main modules are written in comparision to CICS or submodules?

But if you want to code STOP RUN all the time, that is your business.
you just have to remember to use GOBACK when appropriate.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sat Jul 11, 2009 9:31 am    Post subject: Reply with quote

Quote:
Coding Multiple STOP RUN is valid?
May be I sound stubborn if I ask, why would you like to do that?
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sat Jul 11, 2009 10:17 am    Post subject: Reply with quote

My current shop will not allow STOP RUN in any production code.

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.

One might ask , Does any version of COBOL support STOP RUN anymore?

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.
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sat Jul 11, 2009 10:19 am    Post subject: Reply with quote

Natarajan wrote:
Is there any specific reason for suggesting GOBACK instead of STOP RUN , even in normal cobol programs ( i am not talking about sub programs, cics programs )
Other exception here can be IMS-COBOL program. 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.
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL All times are GMT + 5 Hours
Goto page 1, 2  Next
Page 1 of 2



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts How about MF career in top companies? 11 chaitu566 4265 Mon Jun 01, 2015 10:07 am
newwaysys View latest post
No new posts Solutions for top 50 problems faced in performance appraisal 0 Synergita 325 Wed Feb 12, 2014 1:27 pm
Synergita View latest post
No new posts Top 10 Intelligence Agencies of World 1 earthwit 2420 Sat Feb 04, 2012 10:37 am
seetha View latest post
No new posts Top MNC Job : Get into Top MNC 0 arithforu 1552 Mon Jul 27, 2009 3:03 pm
arithforu View latest post
No new posts Repeat Report Headers at the top of the page 1 mainframeman 4239 Tue Dec 12, 2006 10:36 pm
Frank Yaeger View latest post
 


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-4264.html