IBM Support

On UNIX-based operating systems, DB2 commands fail when they include parenthesis and are used with WebSphere Process Server (WPS)

Troubleshooting


Problem

When you use DB2 commands that include parenthesis, you might encounter a "bash: syntax error near unexpected token `('" error.

Resolving The Problem

On UNIX-based operating systems, parentheses have special meaning to the command shell. Thus, they must be preceded with a "\" character or surrounded with quotation marks.

For example, an attempt was made to use scripts to switch to the Java™-based user-defined functions (UDFs) in the Business Process Choreographer reporting database. This attempt used the procedures described in the Using scripts to select Java user-defined functions topic within the information center. The following command in that topic resulted in a "bash: syntax error near unexpected token `('" error:
db2 call sqlj.install_jar('file:pathURL','schema.BPCODBUTIL')

To resolve the issue, use double quotation marks around the command as shown in the following example:

db2 "call sqlj.install_jar('file:pathURL','schema.BPCODBUTIL')"

[{"Product":{"code":"SSQH9M","label":"WebSphere Process Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Business Process Choreographer Observer","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"7.0.0.4;7.0.0.3;7.0.0.2;7.0.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

More support for:
WebSphere Process Server

Software version:
7.0.0.4, 7.0.0.3, 7.0.0.2, 7.0.0.1

Operating system(s):
AIX, HP-UX, Linux, Solaris

Document number:
204719

Modified date:
15 June 2018

UID

swg21584543

Manage My Notification Subscriptions