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

Called programs-Few doubts


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shalini bhat

New User


Joined: 26 Feb 2007
Posts: 4
Location: India

PostPosted: Mon Mar 19, 2007 8:10 pm
Reply with quote

Hi,

1)If I am passing 3 parameters to a called program and in the linkage section I have defined only 2 of the variables, what will happen and why ?
2)What happens if elements are not passed in the oder of thier receiving ?
what will the error be ?
3)IF I am passing 2 variables from Prgm A to Prg B which has 3 variables defined in the linkage section , what will happen ?
4)What is the logic behind passing data by value ?

Regards,
Shalini
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Mar 19, 2007 8:44 pm
Reply with quote

Hello,

For questions 1,2,&3, keep in mind that the address of the parameter is passed - not the actual data (all that is established is addressability). If the calling and called modules do not have the same parameter definition (to use an old IBM phrase), "the results may be unpredictable". You may get anything from incorrect results to an abend (i.e. s0c7).

In question 4, the actual data is presented to the called module in a temporary field (there is no addressability back to the caller's data). Any manipulation to this data will be only for the use of the called module - the data in the calling program will remain unchanged.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Finding Assembler programs PL/I & Assembler 5
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
No new posts Intertest Batch issue with called ass... COBOL Programming 4
Search our Forums:

Back to Top