Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
What will happen if we dont specify STOP RUN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: What will happen if we dont specify STOP RUN
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    Post subject:
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

Site Director


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

PostPosted: Sat Feb 10, 2007 5:05 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Stop Process when file is empty Roland Brosio DFSORT/ICETOOL 4 Thu Jun 25, 2015 1:20 pm
No new posts what will happen improper PCB order s... srinivasulu.p IMS DB/DC 1 Mon Mar 24, 2014 8:27 am
No new posts What is supposed to happen when the G... superk JCL & VSAM 10 Fri Dec 13, 2013 9:39 pm
No new posts Ttruncation happen in db2 table while... sivasaras DB2 4 Fri Sep 27, 2013 8:53 pm
No new posts Urgent Issue: Stop the execution of R... ezhavendhan TSO/ISPF 3 Mon Aug 26, 2013 5:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us