You could fake what you want and/or work around the proposed IBM change by
using DDNAME and a symbol, right?

// SET OPTF=SQLOPTS or one of the other names below
//* Or could be a parm on the PROC invocation


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Frank Swarbrick
Sent: Friday, February 9, 2018 3:23 PM
Subject: Re: Question for COBOL users

Our shop currently uses OPTFILE in conjunction with the SQL compiler option
in order to supply particular SQL "compile" options to the SQL precompiler
for those COBOL program that have EXEC SQL statements.  This allows us to 1)
avoid having a separate "DB2 batch" and "DB2 CICS" procs.  We simply use our
"standard" batch and CICS compile procs, and the SQL preprocessor is invoked
if the source code has "PROCESS SQL OPTFILE" at the top.  Our "SYSOPTF" has
the following:

So the change that you suggest would indeed "break" our environment.  Well,
perhaps not, because I don't think it would do any harm to supply SQL
options for programs that don't have any SQL statements, but...

My personal wish would be that OPTFILE have an option to specify one or more
DD names that it would open, rather than SYSOPTF being the only name.  If
that had been available we'd probably use OPTFILE(DB2OPTF) or some such
thing.  Of course that doesn't really solve your particular RFE.  Sounds
like you need a new compiler option that tells the compiler to use SYSOPTF
if present, but only if the new option is specified.

For IBM-MAIN subscribe / signoff / archive access instructions,
send email to with the message: INFO IBM-MAIN

Reply via email to