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
 

 

Can the same file be used by both calling and called module?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
sindhuvava
Currently Banned

New User


Joined: 05 Dec 2006
Posts: 17
Location: Chennai

PostPosted: Wed Oct 24, 2007 3:57 pm    Post subject: Can the same file be used by both calling and called module?
Reply with quote

Can anyone help me!!!

1) Suppose an indexed file has following value in Key

SANATH
SANJAY
SANJIB
358796
532176
665040

to read this file in Cobol the Key is initialized with Zeros and a START command is issued having Key=<key varaiable name>. Now if a READ NEXT is issued,which record it wil read?

a) record having key SANJIB
b) record having key SANATH
c) record having key 358796
d) No record wil be read because there is no key '00000'
e) record having key 532176

2) Can the same file be used by both calling and called module?

a)yes but the called module does not have any SELECT clause or FD entry for that file
b)Yes,provided callin module closes the file befor called module opens and viceversa
c)no if one program makes update that wil not be visible to the other program
d) yes in JCL the mode has to be DISP=SHR
e)Yes only KSDS files can be used in this way with SHARE OPTION=(2,3)
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Oct 24, 2007 7:30 pm    Post subject:
Reply with quote

Sindhu,

Quote:
Now if a READ NEXT is issued,which record it wil read?

Verify what '23' file status stand for.


Quote:
Can the same file be used by both calling and called module?

There is a topic recenly discussed in forum on this issue. Search for it.
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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Could we identify the called modules ... elixir1986 COBOL Programming 5 Fri Jul 14, 2017 1:53 am


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