Here are explanations of redirection change of dbisqlc.
[Problem]
After upgrading to IQ15.4, redirection output is empty when using dbisqlc like below.
> dbisqlc -c dsn=xxx -q "select @@version" > output.log
> ls -al output.log -- 0 byte (empty) output is generated.
[Cause]
An Output redirection in dbisqlc was changed in IQ 15.2 ESD#3 (CR# 679284).
[Resolution]
From 15.2 ESD#3 SQL "output redirection" should be managed with the ">&" syntax instead of ">" at the command line like below.
> dbisqlc -c dsn=xxx -q "select @@version >& output.log"
A dbisql redirection's has not been changed, and dbisqlc is deprecated.
Recommend to use a dbisql not dbisqlc.
If you want to redirect to output file with input file,
you need to use a read statement and enclose the input/output file with double qoute symbol.
And need to change the redirect from > to >& like below.
> dbisqlc -c dsn=xxx -q -nogui "read input.sql >& output_file"
[input.sql]
select @@version;
An output_file is generated with above way like below.
Ex)
[hpita:/gjang]dbisqlc -c dsn=hpita_iqdemo -q -nogui "read a.sql >& a.log"
[hpita:/gjang]cat a.log
...
'SAP IQ/16.0.0.808/150105/P/sp08.22/ITANIUM/HP-UXi 11.31/64bit/2015-01-05 12:04:21'
[Reference]
** dbisqlc Interactive SQL Classic Utility (Deprecated) --IQ15.4 Utility Guide
HTH
Gi-Sung Jang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Subject | Kudos |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
User | Count |
---|---|
38 | |
19 | |
13 | |
13 | |
11 | |
10 | |
10 | |
10 | |
8 | |
8 |