The SAS Output Delivery System and reporting techniques

SAS DB2 , SEQUENCE KEY IN INSERT STATEMENT

Reply
N/A
Posts: 0

SAS DB2 , SEQUENCE KEY IN INSERT STATEMENT

I have a db2 table defined like this:
Column name Type Length
BATCH_TASK_OID DECIMAL 17
TASK_OID DECIMAL 17
STATUS_CD CHAR 1
START_TS TIMESTMP 10
END_TS TIMESTMP 10.

The sequence key (increment by 1) is defined on first column above. I am trying to insert record into db2 table. How do I mention sequence key in my sas insert statement. I am executing SAS on os/390. My mapto statement looks like below:
PROC DB2UTIL DATA = STARTPROC
TABLE = ADRDNST.BATCH_TASK
FUNCTION = INSERT UPDATE;
MAPTO BATCH_TASK_OID.NEXTVAL = BATCH_TASK_OID
TASKCD = TASK_OID
STATUSCD = STATUS_CD
STARTTS = START_TS
ENDTS = END_TS

But it is giving error : "The symbol is not recognized and will be ignored". Please let me know if anyone used insert statement for sequence keys? I tried to remove my sequence column above but still gives the error.
Ask a Question
Discussion stats
  • 0 replies
  • 273 views
  • 0 likes
  • 1 in conversation