View previous topic :: View next topic
|
Author |
Message |
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
Hi,
I have a normal COBOL Program which do not contain any files.
In the jcl i have specified the ddname for an input file with DISP=SHR,still the job went fine.
Can anyone tell me the reason behind this. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the JCL ( converter/interpreter/initiator) sets up all the control blocks according to the jcl statements found in the input job stream,
it will then start the program execution...
that' s all
it is not supposed to know all the program details
take IEFBR14 for example
You get all the side effects of JCL, but the program does exactly that ... nothing |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Well, if the program doesn't open a file that is specified in JCL it ignores it.
But if it does do an open and the JCL doesn't have it ....................... |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Just curious. Was there a reason for you to include that file? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
sri_mf wrote: |
I have a normal COBOL Program which do not contain any files.In the jcl i have specified the ddname for an input file with DISP=SHR,still the job went fine. |
DDname is the the "linker" between COBOL program & JCL. In this
Code: |
SELECT COBOL-file-name ASSIGN TO DDNAME. |
of a program, DDNAME is the "only" communication (as far as above file processing is concerned) between JCL executing this program; when COBOL-pgm is not "conveyed" this DDname, program just "don't care" about the file associated with this DD name & no abend.
But if you will do vise versa, you'll get an abend, typically U4038. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Can anyone tell me the reason behind this. |
Simply, nothing was wrong, so no error was presented.
The worst thing about that situation is it can cause confusion and unnecessarily tie up the file. |
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
mmwife wrote: |
Just curious. Was there a reason for you to include that file? |
No special reason to include the file just to know the reason behind that as it went fine..
Thanks to all for ur valuable replies.. |
|
Back to top |
|
|
|