I am doing db2 database migration to 10.5 from 9.5. After loading data. I'll need to reset all sequence value. I have this shell script produce a file after executing below SQL. But it gave me syntax error. I know it should be a constant value after key words "restart with", but we need to auto this process. Does anyone have idea how to achieve this ? Thanks lot !

db2 -x "select 'alter sequence ' || rtrim(a.SEQSCHE MA)||'.'||rtrim (a.SEQNAME)...