Technote (troubleshooting)
Problem(Abstract)
New line is inserted every 80 bytes when sql query results are displayed. This causes readability issues.
Resolving the problem
The nco_sql tool is a wrapper script around isql. The nco_sql tool only exposes a subset of the functionality of the isql utility. The isql utility is supplied by Sybase and searching the internet for the Sybase manuals will show the complete set of commands which might be able to help in formatting the required output.
The following information taken from the manual may help:
Format options for isql
|
Option
|
Default
|
Meaning
|
|
-s colseparator
|
Single space
|
Changes the column separator character |
|
-w columnwidth
|
80 characters
|
Changes the line width |
|
-e
|
N/A
|
Includes each command issued to isql in the output |
|
-n
|
N/A
|
Removes numbering and prompt symbols |
To increase the column width of your nco_sql output (to 200 characters for example), perform the following:
1) Create a backup copy of the original nco_sql wrapper script
e.g.
cd $NCHOME/omnibus/bin
cp nco_sql nco_sql.orig
2) Edit the script by changing the following line:
From:
exec $COMMON_ARCH_BIN_DIR/isql -S$OMNISERVER -U$OMNIUSER $OMNIPASSWD -I$INTERFACES $OMNITIMEOUT_ARG
To :
exec $COMMON_ARCH_BIN_DIR/isql -w 200 -S$OMNISERVER -U$OMNIUSER $OMNIPASSWD -I$INTERFACES $OMNITIMEOUT_ARG
Product Alias/Synonym
OMNIBus
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.