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

Input file in JCL but not in COBOL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Wed Jun 04, 2008 1:41 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 04, 2008 1:46 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jun 04, 2008 4:17 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Jun 04, 2008 6:19 pm
Reply with quote

Just curious. Was there a reason for you to include that file?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jun 04, 2008 8:25 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 04, 2008 9:57 pm
Reply with quote

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
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Fri Jun 06, 2008 4:42 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top