View previous topic :: View next topic
|
Author |
Message |
Lavanya_Dhushetty Warnings : 2 New User
Joined: 30 Aug 2007 Posts: 24 Location: Chennai
|
|
|
|
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 |
|
|
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
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 |
|
|
Lavanya_Dhushetty Warnings : 2 New User
Joined: 30 Aug 2007 Posts: 24 Location: Chennai
|
|
|
|
Thanks a lot for da reply |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
Sundar V
New User
Joined: 25 Apr 2006 Posts: 5
|
|
|
|
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 |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
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 |
|
|
|