Syntax problem, when adainv called

Hello !
I want to start an Adabas invert for 1 spd, but I get a syntax error during script execution:


export ASSO1
export DATA1
export WORK1
export INVERR=$HOME/bat/INVERT.err
export SYSOUT=$HOME/bat/INVERT.out

adainv dbid=014 invert=256 fields cp=ab(1,12),ad(1,14) end_of_fields > $SYSOUT

… & the error string:

./invert.bsh: line 12: syntax error near unexpected token (' ./invert.bsh: line 12: adainv dbid=014 invert=256 fields cp=ab(1,12),ad(1,14) end_of_fields > $SYS

Could somebody explain me, how should I write the script. Is it possible at all, to create new spd with like looking script ?
I tried to create descr. for one normal field, it goes without problems. :frowning:

Platform: x86, RH AS 3, Adabas 3x

Left and right parenthesis are special characters and therefore interpreted by the shell. Please put your parenthesis in single quotes to avoid this error.

adainv dbid=014 invert=256 fields cp='ab(1,12),ad(1,14)' end_of_fields > $SYS

Excuse me, I didn’t have any time to answer in June.
I have tried the suggested changes. Despite entering these ’ characters, the syntax error appeared.
Next have I removed the first line from the script
( #!/bin/sh ). It goes very well now :smiley: .
I suggest to publish some advice in Adabas Docu (e.g. my (finally corrected) example of use of the ADAINV utility :wink: ).
Thank you.