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



IBM's flagship relational database management system

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

Postby igorkigork » Fri Feb 12, 2010 10:48 pm

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.
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Sat Feb 13, 2010 3:39 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby igorkigork » Tue Feb 16, 2010 11:01 pm

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;
//
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Wed Feb 17, 2010 3:54 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby igorkigork » Wed Feb 17, 2010 10:10 pm

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.
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Robert Sample » Wed Feb 17, 2010 11:38 pm

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?
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

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

Postby dick scherrer » Thu Feb 18, 2010 1:13 am

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
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby igorkigork » Thu Feb 18, 2010 1:20 am

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.
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby igorkigork » Thu Feb 18, 2010 1:37 am

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.
igorkigork
 
Posts: 16
Joined: Thu Feb 11, 2010 9:56 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post