|
|
| Author |
Message |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1695 Location: Mumbai, India
|
|
|
|
| CICS Guy wrote: |
| Doesn't COBOL generate an implicit GOBACK at the end of the a program? |
No I think it doesn't happen. Ran a program without GO BACK (or STOP RUN), program was abended with ABEND=S000 U4038 REASON=00000001
with the following message in SYSOUT
| Quote: |
| The flow of control in program TESTPGM proceeded beyond the last line of the program. |
While the same program executes well with GO BACK. |
|
| Back to top |
|
 |
References
|
Posted: Fri Apr 25, 2008 2:39 am Post subject: Re: |
 |
|
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1695 Location: Mumbai, India
|
|
|
|
Once again I'm in..
Tried the below codes:
| Code: |
PROCEDURE DIVISION.
PERFORM 0000-PARA.
DISPLAY"AFTER PERFORM".
0000-PARA.
DISPLAY"INSIDE PARA".
GOBACK. |
SYSOUT:
And the other code is:
| Code: |
PROCEDURE DIVISION.
PERFORM 0000-PARA.
DISPLAY"AFTER PERFORM".
GOBACK.
0000-PARA.
DISPLAY"INSIDE PARA". |
SYSOUT:
| Code: |
INSIDE PARA
AFTER PERFORM |
Check the positions of GO BACK.
Hope this helps. |
|
| Back to top |
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1695 Location: Mumbai, India
|
|
|
|
One moment..something wrong is here..thread is started by "rdr" & followed up by "mohitsaini"....who I'm answering to...  |
|
| Back to top |
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1142 Location: At my desk
|
|
|
|
| Anuj D. wrote: |
One moment..something wrong is here..thread is started by "rdr" & followed up by "mohitsaini"....who I'm answering to...  |
There are several who confuse which ID they are signed on as....grin......
Or it just coud be that "mohitsaini" managed to duplicate "rdr"s actual (unposted) code...... |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7505 Location: 221 B Baker St
|
|
|
|
Possibly the same homework assignment. . .?
And if the "lesson" was actually about SECTIONs, the point was entirely missed. . .
d |
|
| Back to top |
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1142 Location: At my desk
|
|
|
|
| dick scherrer wrote: |
| And if the "lesson" was actually about SECTIONs, the point was entirely missed. . . |
Missed by me too, those were paragraph names...... |
|
| Back to top |
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1695 Location: Mumbai, India
|
|
|
|
| CICS Guy wrote: |
| There are several who confuse which ID they are signed on as....grin...... |
yeah I'm still dealing with William & CICS Guy mystery...
| Quote: |
| And if the "lesson" was actually about SECTIONs, the point was entirely missed. . . |
We should have a seperate Forum for 'most confusing posts'..or a award on 'most confusing posts of the day'..  |
|
| Back to top |
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1142 Location: At my desk
|
|
|
|
| Anuj D. wrote: |
| Quote: |
| And if the "lesson" was actually about SECTIONs, the point was entirely missed. . . |
We should have a seperate Forum for 'most confusing posts'..or a award on 'most confusing posts of the day'..  |
A good suggestion, it is more direct than the Off Topic hole..... And heck, might be more fun....  |
|
| Back to top |
|
 |
mohitsaini
New User
Joined: 15 May 2006 Posts: 40
|
|
|
|
Hi D.Sch,
The new code (with an additional display statement) that I tried is:
PROCEDURE DIVISION.
0000-MAINLINE.
PERFORM SECTIONA.
DISPLAY 'AFTER PERFORM'.
SECTIONA.
DISPLAY 'INSIDE SECTIONA'.
DISPLAY 'GOING BACK'.
GOBACK.
0000-EXIT.
EXIT.
My new sysout is:
INSIDE SECTIONA
GOING BACK |
|
| Back to top |
|
 |
mohitsaini
New User
Joined: 15 May 2006 Posts: 40
|
|
|
|
Hey guys ... let me clear this up .. although the post was started by "RDR" .... but when I tried solving/running his problem/code .... I got some doubts too .... So I also participated in the discussion .... that's all ....
Plz let me know if there is any kind of format/protocol you guys follow while replying to queries.
Sorry for the confusion that was created bcoz of me.
- Mohit |
|
| Back to top |
|
 |
mohitsaini
New User
Joined: 15 May 2006 Posts: 40
|
|
|
|
Looking at Anuj's two separate codes (with different positions of GOBACKs) my doubt is clear.
Thanks everyone. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1387 Location: germany
|
|
|
|
Does that mean that you have clear doubts
or
that you are clear of doubts. |
|
| Back to top |
|
 |
mohitsaini
New User
Joined: 15 May 2006 Posts: 40
|
|
|
|
| That means .... Clear of doubts |
|
| Back to top |
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1695 Location: Mumbai, India
|
|
|
|
Hi,
| Quote: |
| Sorry for the confusion that was created bcoz of me. |
Not a problem..there are rather good confusions here..like
| Quote: |
| There are several who confuse which ID they are signed on as |
..
| Quote: |
| Plz let me know if there is any kind of format/protocol you guys follow while replying to queries. |
Just a good answer in one's reply is my motto..
..and You are welcome if I could be helpful. |
|
| Back to top |
|
 |
Aji
Active User
Joined: 03 Feb 2006 Posts: 52 Location: Mumbai
|
|
|
|
Hi
Eventhough we have given SECTION in the paragrph name, COBOL will not treat it as a SECTION. The SECTION key word should follow the section name.
eg. SECTIONA SECTION.
or TEST SECTION.
Aji |
|
| Back to top |
|
 |
|
|