View previous topic :: View next topic
|
Author |
Message |
sandhyamf Warnings : 1 New User
Joined: 07 Feb 2007 Posts: 3 Location: hyderabad
|
|
|
|
Hi,
What will happen if we dont specify STOP RUN?
What are the mandatory divisions in cobol?
Regards,
Sandhya. |
|
Back to top |
|
|
monga
New User
Joined: 18 Apr 2006 Posts: 13
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|