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
 

 

Bypass DDNAME in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
koteswara

New User


Joined: 23 Sep 2009
Posts: 22
Location: Bangalore

PostPosted: Wed Nov 11, 2009 6:56 pm    Post subject: Bypass DDNAME in JCL
Reply with quote

Is there any equivalent to cobol compiler option for

SELECT [OPTIONAL] FILE NAME ASSIGN TO DDNAME

Job is running successfully after commenting the DDNAME in the JCL as well. Program does not contain the Optional clause.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7931
Location: Bellevue, IA

PostPosted: Wed Nov 11, 2009 7:13 pm    Post subject:
Reply with quote

Your post does not make sense. The COBOL statement SELECT OPTIONAL is not an option, it is a statement.

And if the program does not contain the OPTIONAL clause, the DD name must be present in the JCL for the program to execute correctly.

Post the job output and relevant COBOL code in BBcode format for review. And restate your question so it makes sense.
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Wed Nov 11, 2009 7:19 pm    Post subject:
Reply with quote

Always try to post your question in a way others can understand. If not we cannot help you much.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Wed Nov 11, 2009 7:44 pm    Post subject:
Reply with quote

Robert Sample wrote:
if the program does not contain the OPTIONAL clause, the DD name must be present in the JCL for the program to execute correctly.

Actually, under Enterprise COBOL, this is not always true. The Programmer's Guide says:

"3. If neither a ddname nor an environment variable is defined, the following steps occur: a. If the allocation is for a QSAM file and the CBLQDA runtime option is in effect, CBLQDA dynamic allocation processing takes place for those eligible files. This type of ″implicit″ dynamic allocation persists for the life of the run unit and cannot be reallocated. b. Otherwise, the allocation fails. The COBOL run time deallocates all dynamic allocations at run unit termination, except for implicit CBLQDA allocations."

A while back I spelled an output DDNAME wrong and had a difficult time figuring out why my output dataset was not being populated. The program did NOT abend, and appeared to execute "correctly" according to the SYSOUT message log. It wasn't until I checked the allocation/deallocation messages that I discovered the error.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7931
Location: Bellevue, IA

PostPosted: Wed Nov 11, 2009 7:56 pm    Post subject:
Reply with quote

I didn't think about the LE CBLQDA option -- I stand corrected. The lesson is to always check the allocation messages to ensure the files you think are being allocated actually are!
Back to top
View user's profile Send private message
koteswara

New User


Joined: 23 Sep 2009
Posts: 22
Location: Bangalore

PostPosted: Thu Nov 12, 2009 1:21 pm    Post subject:
Reply with quote

Hi All,
Thanks for all the responses.File Status "35" is handled in the program,Hence the Job is running.

OPEN INPUT ABCD.
IF ABCD-FILE-STATUS = AA35
PERFORM AX-LOCK-TABLES
PERFORM BY-LOAD-AUTHORITY
MOVE AZ99 TO HD-REC-COUNT
PERFORM BXY-PROCESS-NORESP
PERFORM BZA-RECON-REPORT
PERFORM C50-FINAL
STOP RUN
END-IF.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts output DDname JESMSGLG job during exe... italo_pm TSO/ISPF 16 Tue Jun 21, 2016 11:13 am
No new posts how to alter a vsam using its ddname ... boyti ko JCL & VSAM 11 Thu Nov 19, 2015 10:49 am
No new posts Bypass certain records in COBOL josepnass All Other Mainframe Topics 5 Fri Aug 08, 2014 6:58 am
No new posts DDNAME allocation in OMVS Midhun Mohandas TSO/ISPF 1 Fri Jun 20, 2014 1:21 pm


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