IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Interview question on CALL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Question for file manager IBM Tools 7
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Call program, directly from panel CLIST & REXX 9
No new posts question for Pedro TSO/ISPF 2
No new posts Batch call online program, EXCI task ... CICS 3
Search our Forums:

Back to Top