By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,227 Members | 1,026 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,227 IT Pros & Developers. It's quick & easy.

update command options has no effect

P: n/a
Hello.

WinXP, db2 v8.2.7

When I use
UPDATE COMMAND OPTION USING <any_switchON(or OFF)
it seems that this command has absolutely no effect on these switches
since command
LIST COMMAND OPTIONS
issued after that shows the same values as before issuing UPDATE
COMMAND OPTIONS.

Is it normal?

Sincerely,
Mark B.

Jan 31 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
4.****@mail.ru wrote:
Hello.

WinXP, db2 v8.2.7

When I use
UPDATE COMMAND OPTION USING <any_switchON(or OFF)
it seems that this command has absolutely no effect on these switches
since command
LIST COMMAND OPTIONS
issued after that shows the same values as before issuing UPDATE
COMMAND OPTIONS.

Is it normal?
Can you provide an example? I use options like C and Z all the time in
QA and they work just fine.
Do you see truly no semantic effect or "merely" no validation in the
LIST command?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jan 31 '07 #2

P: n/a
>db2 list command options

Command Line Processor Option Settings

Backend process wait time (seconds) (DB2BQTIME) = 1
No. of retries to connect to backend (DB2BQTRY) = 60
Request queue wait time (seconds) (DB2RQTIME) = 5
Input queue wait time (seconds) (DB2IQTIME) = 5
Command options (DB2OPTIONS) =

Option Description Current Setting
------ ---------------------------------------- ---------------
-a Display SQLCA OFF
-c Auto-Commit ON
....
>db2 update command options using C OFF
DB20000I The UPDATE COMMAND OPTIONS command completed successfully.
>db2 list command options
Command Line Processor Option Settings

Backend process wait time (seconds) (DB2BQTIME) = 1
No. of retries to connect to backend (DB2BQTRY) = 60
Request queue wait time (seconds) (DB2RQTIME) = 5
Input queue wait time (seconds) (DB2IQTIME) = 5
Command options (DB2OPTIONS) =

Option Description Current Setting
------ ---------------------------------------- ---------------
-a Display SQLCA OFF
-c Auto-Commit ON
....

Jan 31 '07 #3

P: n/a
Do you see truly no semantic effect or "merely" no validation in the
LIST command?

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
And it seems that display of the LIST COMMAND OPTIONS is correct since
after issuing
UPDATE COMMAND OPTIONS USING C OFF:
>db2 declare global temporary table session.t (i int)
DB20000I The SQL command completed successfully.
>db2 insert into session.t values 1
DB20000I The SQL command completed successfully.
>db2 select * from session.t
I
-----------

0 record(s) selected.

Jan 31 '07 #4

P: n/a
I think that when you issue this, the file holding the options has already
been read and the update affects the file.
Can you issue the command, then db2 terminate and then re-issue the list
command and see the changes.
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
<4.****@mail.rua écrit dans le message de news:
11**********************@v33g2000cwv.googlegroups. com...
Hello.

WinXP, db2 v8.2.7

When I use
UPDATE COMMAND OPTION USING <any_switchON(or OFF)
it seems that this command has absolutely no effect on these switches
since command
LIST COMMAND OPTIONS
issued after that shows the same values as before issuing UPDATE
COMMAND OPTIONS.

Is it normal?

Sincerely,
Mark B.
Jan 31 '07 #5

P: n/a
I think that when you issue this, the file holding the options has already
been read and the update affects the file.
Can you issue the command, then db2 terminate and then re-issue the list
command and see the changes.
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
<4.****@mail.rua écrit dans le message de news:
11**********************@v33g2000cwv.googlegroups. com...
Hello.

WinXP, db2 v8.2.7

When I use
UPDATE COMMAND OPTION USING <any_switchON(or OFF)
it seems that this command has absolutely no effect on these switches
since command
LIST COMMAND OPTIONS
issued after that shows the same values as before issuing UPDATE
COMMAND OPTIONS.

Is it normal?

Sincerely,
Mark B.
Jan 31 '07 #6

P: n/a
Hi,

UPDATE COMMAND OPTION works only for the duration of "db2" interpreter
foreground process's life. If you are in o/s shell and issue:

$ db2 UPDATE COMMAND OPTION C OFF
$

then "db2" interpreter foreground process ends its life immediately
after execution of the command. So, the change to command options
lasts only a fraction of a second and has no effect for next commands/
sql instructions issued in o/s shell.

But if issue:
$ db2
db2 =UPDATE COMMAND OPTION C OFF
db2 =>

then you can see the change, because foreground db2 command line
process is still alive.

Bottom line:
use UPDATE COMMAND OPTION >>>only<<< in scripts and in db2 interactive
prompt.

BTW:
You can also find this in documentation: "Sets one or more command
options during an interactive session, or from a batch input file.",
however I think it in addition should warn, that the command has no
effect in o/s shell prompt.

-- Artur Wronski

Jan 31 '07 #7

P: n/a
Thanks, Artur!
Feb 1 '07 #8

P: n/a
Artur wrote:
UPDATE COMMAND OPTION works only for the duration of "db2" interpreter
foreground process's life. If you are in o/s shell and issue:
Doh!!
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 1 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.