Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Perform-Section
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
Anuj D.

Senior Member


Joined: 22 Apr 2006
Posts: 1593
Location: Mumbai, India

PostPosted: Fri Apr 25, 2008 2:39 am    Post subject:
Reply with quote

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
View user's profile Send private message
References
PostPosted: Fri Apr 25, 2008 2:39 am    Post subject: Re: Reply with quote

Anuj D.

Senior Member


Joined: 22 Apr 2006
Posts: 1593
Location: Mumbai, India

PostPosted: Fri Apr 25, 2008 2:48 am    Post subject:
Reply with quote

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:
Code:
INSIDE PARA


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
View user's profile Send private message
Anuj D.

Senior Member


Joined: 22 Apr 2006
Posts: 1593
Location: Mumbai, India

PostPosted: Fri Apr 25, 2008 2:51 am    Post subject:
Reply with quote

One moment..something wrong is here..thread is started by "rdr" & followed up by "mohitsaini"....who I'm answering to... icon_confused.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 1117
Location: At my desk

PostPosted: Fri Apr 25, 2008 3:08 am    Post subject:
Reply with quote

Anuj D. wrote:
One moment..something wrong is here..thread is started by "rdr" & followed up by "mohitsaini"....who I'm answering to... icon_confused.gif
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
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 7336
Location: 221 B Baker St

PostPosted: Fri Apr 25, 2008 4:09 am    Post subject: Reply to: Perform-Section
Reply with quote

Possibly the same homework assignment. . .?

And if the "lesson" was actually about SECTIONs, the point was entirely missed. . .

d
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 1117
Location: At my desk

PostPosted: Fri Apr 25, 2008 4:46 am    Post subject: Re: Reply to: Perform-Section
Reply with quote

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
View user's profile Send private message
Anuj D.

Senior Member


Joined: 22 Apr 2006
Posts: 1593
Location: Mumbai, India

PostPosted: Fri Apr 25, 2008 5:05 am    Post subject:
Reply with quote

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... icon_razz.gif

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'.. icon_biggrin.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 1117
Location: At my desk

PostPosted: Fri Apr 25, 2008 5:18 am    Post subject:
Reply with quote

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'.. icon_biggrin.gif
A good suggestion, it is more direct than the Off Topic hole..... And heck, might be more fun.... icon_lol.gif
Back to top
View user's profile Send private message
mohitsaini

New User


Joined: 15 May 2006
Posts: 40

PostPosted: Fri Apr 25, 2008 11:01 am    Post subject:
Reply with quote

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
View user's profile Send private message
mohitsaini

New User


Joined: 15 May 2006
Posts: 40

PostPosted: Fri Apr 25, 2008 11:07 am    Post subject:
Reply with quote

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
View user's profile Send private message
mohitsaini

New User


Joined: 15 May 2006
Posts: 40

PostPosted: Fri Apr 25, 2008 11:11 am    Post subject:
Reply with quote

Looking at Anuj's two separate codes (with different positions of GOBACKs) my doubt is clear.

Thanks everyone.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1343
Location: germany

PostPosted: Fri Apr 25, 2008 11:20 am    Post subject:
Reply with quote

Does that mean that you have clear doubts
or
that you are clear of doubts.
Back to top
View user's profile Send private message
mohitsaini

New User


Joined: 15 May 2006
Posts: 40

PostPosted: Fri Apr 25, 2008 11:37 am    Post subject:
Reply with quote

That means .... Clear of doubts
Back to top
View user's profile Send private message
Anuj D.

Senior Member


Joined: 22 Apr 2006
Posts: 1593
Location: Mumbai, India

PostPosted: Fri Apr 25, 2008 12:49 pm    Post subject:
Reply with quote

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
.. icon_razz.gif

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
View user's profile Send private message
Aji

Active User


Joined: 03 Feb 2006
Posts: 52
Location: Mumbai

PostPosted: Mon Apr 28, 2008 4:01 pm    Post subject: Reply to: Perform-Section
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 HoursGoto page Previous  1, 2, 3  Next
Page 2 of 3