syntax error near unexpected token `('
I have this function to call this in my .sh script file, getting the syntax error near unexpected token `('. Please advise if any change required to replace/bypass the character (
function purge_data { call_db2 SET SERVEROUTPUT ON call_db2 call $SCHEMA_NAME.ALL_DATA_PURGE1('$SCHEMA_NAME',$DAYS,$COMMIT_COUNT); call_db2 SET SERVEROUTPUT OFF } |
Try this:
Quote:
|
might be that sh interprets everything after the $ as the variable name.
Try Quote:
|
hey :) i get that error too when running some of my bash scripts when vars going between dir levels, i think ???
|
It's not clear if the strings that start with $ are supposed to be shell variables or DB2 constructs.
If they are shell variables, this: '$SCHEMA_NAME' looks wrong. If they are not shell variables, the $SCHEMA_NAME in this: call $SCHEMA_NAME.... will be replaced by the empty string, which looks wrong as well. |
All times are GMT -5. The time now is 11:25 AM. |