View previous topic :: View next topic
|
Author |
Message |
shalini bhat
New User
Joined: 26 Feb 2007 Posts: 4 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|