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
 

 

Input file in JCL but not in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Wed Jun 04, 2008 1:41 pm    Post subject: Input file in JCL but not in COBOL
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10292
Location: italy

PostPosted: Wed Jun 04, 2008 1:46 pm    Post subject: Reply to: Input file in JCL but not in COBOL
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 04, 2008 4:17 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Wed Jun 04, 2008 8:25 pm    Post subject: Re: Input file in JCL but not in COBOL
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

Site Director


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

PostPosted: Wed Jun 04, 2008 9:57 pm    Post subject:
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: 215
Location: India

PostPosted: Fri Jun 06, 2008 4:42 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts Getting Mutiple input from Panels vidyaa CLIST & REXX 12 Mon Aug 14, 2017 1:28 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am


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