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 on CALL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
learnmf

Active User


Joined: 14 Mar 2005
Posts: 123

PostPosted: Sat Oct 01, 2005 6:54 pm    Post subject: Interview question on CALL
Reply with quote

Prog A call Prog B.
ws-a(Whose value is 10) variable is pass from prog a to prog-b.
Now the value of ws-a is changed to 20.In prog-B we give stop Run.
What will happen?
Error occurs or not and what will be the value of ws-a in prog-a?
Back to top
View user's profile Send private message

sarath_ibm

New User


Joined: 03 Aug 2005
Posts: 14
Location: hyderabad

PostPosted: Thu Oct 06, 2005 5:23 pm    Post subject: CALL statement
Reply with quote

It depends whether you are calling the program using call by value or call by reference.

If it is call by value, ws-a will remain unchanged. Else, ws-a will be chnaged to 20.

While using Stop run in called program, the control will go directly to OS and stops the execution.

Instead if we use EXIT, it'll return to the calling program.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts using CALL PLIRETC(somevalu) Pedro PL/I & Assembler 1 Wed May 09, 2018 10:25 pm
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts Print call stack in Mainframe C DIPANKAR SAHA ABENDS & Debugging 2 Thu Mar 15, 2018 2:58 pm
No new posts A couple of Interview Questions on Co... viplavmodi36 Mainframe Interview Questions 5 Fri Feb 23, 2018 6:21 pm
No new posts JES2 EXIT 6 QUESTION Randy Horowitz All Other Mainframe Topics 30 Tue Feb 06, 2018 5:47 pm

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