IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What will happen if we dont specify STOP RUN


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandhyamf
Warnings : 1

New User


Joined: 07 Feb 2007
Posts: 3
Location: hyderabad

PostPosted: Fri Feb 09, 2007 1:10 pm
Reply with quote

Hi,

What will happen if we dont specify STOP RUN?
What are the mandatory divisions in cobol?


Regards,
Sandhya.
Back to top
View user's profile Send private message
monga

New User


Joined: 18 Apr 2006
Posts: 13

PostPosted: Fri Feb 09, 2007 2:17 pm
Reply with quote

I guess it is necessary to specify STOP RUN as that indicates a logical end to the program.

Mandatory Divisions are:

IDENTIFICATION DIVISION
DATA DIVISION
PROCEDURE DIVISION

Thanks,

monga
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Feb 10, 2007 5:05 am
Reply with quote

Hello,

If you do not specify STOP RUN (or GOBACK) you will most likely get an 0c1, 0c4, 001 etc abend. Depending on where your program winds up, you will fall out the bottom or hit an i/o on an un-opened file.

I ran one here and thanks to abend-aid got
Quote:
Because the program did not have a terminator (STOP, GOBACK, or EXIT),
control fell through the last instruction.


It "knew" i fell out the bottom.


You also need an ENVIRONMENT DIVISION or you will get something like
Quote:
10 IGYDS1005-E THE "ENVIRONMENT DIVISION" HEADER WAS NOT FOUND.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts How to stop a runaway CICS trans with... CICS 13
No new posts Query regarding STOP REGION XX ABDU... IMS DB/DC 11
This topic is locked: you cannot edit posts or make replies. Data Sets are files. Please stop str... JCL & VSAM 11
No new posts What will happen if we dont code STOP... COBOL Programming 4
No new posts Stop Process when file is empty DFSORT/ICETOOL 4
Search our Forums:

Back to Top