Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Called programs-Few doubts

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Called programs-Few doubts
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

Site Director


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

PostPosted: Mon Mar 19, 2007 8:44 pm    Post subject:
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    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 Why myself doing Package Bind always ... Susanta DB2 5 Thu Mar 02, 2017 10:47 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 5 Tue Nov 29, 2016 9:25 pm
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
This topic is locked: you cannot edit posts or make replies. How to supply called sub-program from... dchristensen JCL & VSAM 25 Wed Sep 14, 2016 11:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us