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

How many DD names/files needs to be mentioned


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 191
Location: hyderabad

PostPosted: Mon Sep 17, 2007 7:47 pm
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

Moderator Emeritus


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

PostPosted: Mon Sep 17, 2007 7:48 pm
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
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
Reply with quote

Thanks a lot for da reply
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: Wed Sep 19, 2007 8:29 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top