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

Bypass DDNAME in JCL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 11, 2009 7:13 pm
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Nov 11, 2009 7:56 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How can I find the DDname of a file u... CICS 10
No new posts ADR324E-VOL/DATASET SPECIFIED BY DDNA... JCL & VSAM 6
No new posts Read a file dynamically without the d... COBOL Programming 4
No new posts INVALID RECFM FOR DDNAME SYSLIN AND C... All Other Mainframe Topics 7
No new posts LMINIT problem - not finding DDNAME CLIST & REXX 7
Search our Forums:

Back to Top