Page 1 of 1

HOW TO CHANGE DB2 PRECOMPILER OPTIONS for pl/i program.

PostPosted: Fri Feb 12, 2010 10:48 pm
by igorkigork
Hi, could you help please.

to change pl/i compiler options we can use *process statement,
is there a statement to change DB2 precompiler options from inside the program?

thank you.

Re: HOW TO CHANGE DB2 PRECOMPILER OPTIONS for pl/i program.

PostPosted: Sat Feb 13, 2010 3:39 am
by dick scherrer
Hello,

is there a statement to change DB2 precompiler options from inside the program?
What is this asking? For something to happen "inside the program", it would need to be compiled?

Maybe it will help if you give some example of what you want to accomplish.

This sounds more like a pl/i question than a db2 question. But again, i may misunderstand.

Re: HOW TO CHANGE DB2 PRECOMPILER OPTIONS for pl/i program.

PostPosted: Tue Feb 16, 2010 11:01 pm
by igorkigork
dick,
yes it would...and the question might be on the border between DB2 and PL/I.

in the following example macro, insource, list, mdesk pl/i compiler options will override
options passed to compiler in jcl:
this i called - "to change options from inside the program"
My question was is there similar way to change DB2 precompiller options?

//PLI EXEC PGM=IBMZPLI,
// PARM=('NOMACRO,NOINSOURCE,NOLIST,NOSYNTAX,NOMDECK,NIS,PROCESS(KEEP)')
//sysin dd *
*process macro, insource, list, mdesk;
abc: procedure options(main);
...
EXEC SQL INCLUDE SQLCA;
EXEC SQL INCLUDE SQLDA;
....
EXEC SQL DECLARE ST1 STATEMENT;
EXEC SQL DECLARE ST2 STATEMENT;
....
end abc;
//

Re: HOW TO CHANGE DB2 PRECOMPILER OPTIONS for pl/i program.

PostPosted: Wed Feb 17, 2010 3:54 am
by dick scherrer
Hello,

My question was is there similar way to change DB2 precompiller options?

From the V8 Application Programming and SQL Guide:
If you use the PL/I macro processor, you must not use the PL/I *PROCESS statement in the source to pass options to the PL/I compiler. You can specify the needed options on the PARM.PLI= parameter of the EXEC statement in the DSNHPLI procedure.

Re: HOW TO CHANGE DB2 PRECOMPILER OPTIONS for pl/i program.

PostPosted: Wed Feb 17, 2010 10:10 pm
by igorkigork
Dick,

Could you please point me to what embedded statement I "must not use in the source to pass options to the DB2 SQL precompiler" I will make a decision how strong that "must" is for my particular case.
By the way, your point to "must not" is applied only for: "The PL/I macro processor can generate SQL statements or host variable DCL statements if you run the macro processor before running the DB2 precompiler.", to prevent some unpredictable results. And "you can not, must not" often is used to show "i do not know how".

Than you.

Re: HOW TO CHANGE DB2 PRECOMPILER OPTIONS for pl/i program.

PostPosted: Wed Feb 17, 2010 11:38 pm
by Robert Sample
And "you can not, must not" often is used to show "i do not know how".
You haven't spent much time in the IBM manuals, then, have you? When the manual tells you not to do something, that's not somebody saying they don't know how -- you are being told that at best unpredictable results will occur (at worst, you can bring down the entire LPAR you're running in) if you attempt to do what the manual says not to do.

With this attitude about the manuals, and since attention to detail and understanding what the manuals tell you is so critical to IT, perhaps you should consider a different career choice?

Re: HOW TO CHANGE DB2 PRECOMPILER OPTIONS for pl/i program.

PostPosted: Thu Feb 18, 2010 1:13 am
by dick scherrer
Hello,

And "you can not, must not" often is used to show "i do not know how".
Yes, it often is - however i have never seen this meaning when stated in an IBM manual. . . Which was mentioned immediately before the quote. . .
From the V8 Application Programming and SQL Guide:


I will make a decision how strong that "must" is for my particular case.
If you believe your decision should override published direction from the author/vendor you are completely out of our league.

d

Re: HOW TO CHANGE DB2 PRECOMPILER OPTIONS for pl/i program.

PostPosted: Thu Feb 18, 2010 1:20 am
by igorkigork
Robert,

Unfortunately you do not understand what we were talking about at all...
for you to know: Same question was discussed with IBM, i've received there answer:
"The flexibility you are looking for (i.e precompiler overrides via
program versus precompiler JCL) is not available within the precompiler
and/or the DB2 coprocessor. If this is a business requirement, let me know and I can include a
TEMPLATE for Design Change Request".
have you already started a different career choice?

thank you.

Re: HOW TO CHANGE DB2 PRECOMPILER OPTIONS for pl/i program.

PostPosted: Thu Feb 18, 2010 1:37 am
by igorkigork
dick scherrer wrote:Hello,

And "you can not, must not" often is used to show "i do not know how".
Yes, it often is - however i have never seen this meaning when stated in an IBM manual. . . Which was mentioned immediately before the quote. . .
From the V8 Application Programming and SQL Guide:


I will make a decision how strong that "must" is for my particular case.
If you believe your decision should override published direction from the author/vendor you are completely out of our league.

d


Dick,
again, manual's "must not" is for particular case when "if you run the macro processor before running the DB2 precompiler". and even in that case some options might be overriden without any "unpredictable" results.
people produce manuals, people make mistakes...
out of league? i'll think about that.

thank you.