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
 

 

How many DD names/files needs to be mentioned

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
Lavanya_Dhushetty
Warnings : 2

New User


Joined: 30 Aug 2007
Posts: 24
Location: Chennai

PostPosted: Mon Sep 17, 2007 6:53 pm    Post subject: How many DD names/files needs to be mentioned
Reply with quote

Suppose program A calls program B program A uses 3 files and program B uses 2 files. While writing the JCL for executing program A, how many DD names/files needs to be mentioned?

a. 5 files
b. 2 files
c. 3 files
d. If a called program uses any file then a separate step needs to be written for that called module
e. None of the listed options.
Back to top
View user's profile Send private message

sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 190
Location: hyderabad

PostPosted: Mon Sep 17, 2007 7:47 pm    Post subject: Reply to: DD names/files
Reply with quote

hi,

5 files are needed with different DDnames
no seperate steps are needed for sub programs

in the jcl given run program(mainprogramname) plan(planname)



Cheers...
Prasad
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 Sep 17, 2007 7:48 pm    Post subject:
Reply with quote

Hello,

Both modules use different files - the number of files/dd statements is 5. There would be 3 FDs in the first module and 2 FDs in the second.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Tue Sep 18, 2007 2:43 am    Post subject:
Reply with quote

The DD name may or may not be coded in JCL depends on what exactly the COBOL program is doing.
We can write Assembler program to read the files from COBOL program dynamically, in this case NO DD name statement is coded in the JCL.
Back to top
View user's profile Send private message
Lavanya_Dhushetty
Warnings : 2

New User


Joined: 30 Aug 2007
Posts: 24
Location: Chennai

PostPosted: Wed Sep 19, 2007 2:45 pm    Post subject: Reply to: DD names/files
Reply with quote

Thanks a lot for da reply
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: Wed Sep 19, 2007 8:29 pm    Post subject:
Reply with quote

You're welcome icon_smile.gif
Back to top
View user's profile Send private message
Sundar V

New User


Joined: 25 Apr 2006
Posts: 5

PostPosted: Thu Jan 10, 2008 11:39 am    Post subject: Reply to: How many DD names/files needs to be mentioned
Reply with quote

Hi,

Suppose if i have 3 files which is being used in both programs A and B. Then will it be sufficient for me to keep 3 DD statement seperately in JCL and file declaration (FD) have to defined seperately in both the programs (A and B)?

Please advise my understanding is correct or not?

I taught of writing my doubt/question in seperate query/thread. And i found a discussion was already done about this topic. So i included my doubt with this.

Thanks for your support.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Thu Jan 10, 2008 9:22 pm    Post subject:
Reply with quote

Yes it is possible for the calling program and the called program to use the same 3 DDs. You may need to have the files closed in the calling program while the called program is running and vise versa. You could also declare the files to be external. It all depends on how you need to use the files. In many cases it is clearer to have 1 of the programs do all of the file access for files in common between calling and called programs.
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 Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


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