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
 
Interview question which I failed to answer.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
arindambanerjee

New User


Joined: 30 Jun 2007
Posts: 39
Location: India

PostPosted: Sat Jul 11, 2009 7:37 pm    Post subject: Interview question which I failed to answer.
Reply with quote

Hi,

I have been asked a question in an interview as below:

CASE1:
....
A0-section.
......
Perform AB-para.
...
...

A0-Exit
Exit.


AB-Para.
...
...
Perform D-para.
....
AB-para-end.
exit.

CASE2:

...
A0-section.
......
Perform AB-para thru AB-para-end.
...
...

A0-Exit
Exit.


AB-Para.
...
...
Perform D-para.
....
AB-para-end.
exit.


D-Para is there in the code as well.
the question was whats the difference between these two cases and if there is no difference then what will be the flow.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sat Jul 11, 2009 8:54 pm    Post subject:
Reply with quote

Have you reviewed the COBOL Language Reference (manuals link at the top of the page) on the PERFORM statement?

PERFORM paragraph performs only that paragraph. So case 1 would execute the PERFORM, then A8-Para, then D-para, then at the end of A8-Para would return to A0-section and continue. If there's no program exit, control would fall through A0-Exit and start executing A8-Para and so forth.

The main difference in case 2 in that execution would go through the end paragraph, but otherwise there's no difference in execution sequence.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Mon Jul 13, 2009 3:01 pm    Post subject:
Reply with quote

There is no difference in both the approaches from execution per se as Robert has said; though at some shops coding "..thru AB-para-end" in "Perform AB-para thru AB-para-end" comes under coding standards. Every PARA should end with an EXIT though period (.) in place of EXIT would also do the same.
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 question about dfsms management clas... Hervey Martinez IBM Tools 0 Tue Oct 10, 2017 6:19 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm

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