The SAS Output Delivery System and reporting techniques

Error in Data mapping to db2 fields in PROC DB2UTIL

Reply
N/A
Posts: 0

Error in Data mapping to db2 fields in PROC DB2UTIL

I am trying to insert a record into db2 table thru my SAS code using the code below on os/390.
It gives me error "ERROR: Input map and input data do not match, procedure terminated. ". Can anyone please suggest me what is the bug in this code and why I am getting this error.

DATA STARTPROC;
STATUSCD = 'I' ;
TASKCD = 2;
BATCHCD = 3;

PROC PRINT DATA = STARTPROC ;
FORMAT _NUMERIC_ PIB2. ;

PROC DB2UTIL DATA = STARTPROC
TABLE = ADRDNST.BATCH_TASK
FUNCTION = INSERT UPDATE;
MAPTO BATCHCD = BATCH_TASK_OID
TASKCD = TASK_OID
STATUSCD = STATUS_CD ;

The three fields in the table are declared as follows:
BATCH_TASK_OID DECIMAL 17
TASK_OID DECIMAL 17
STATUS_CD CHAR 1

--Raju
Super Contributor
Super Contributor
Posts: 3,174

Re: Error in Data mapping to db2 fields in PROC DB2UTIL

From a cursory view, your STARTPROC SAS file's variable names do not exactly match the DB2 table attribute names.

Also, have you searched the SAS support website at http://support.sas.com/ using your symptom keywords?

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Error in Data mapping to db2 fields in PROC DB2UTIL

Thanks Scott. Now I got my answer. PROC DB2UTIL expects all columns need to be included in the statement. I was omitting some columns which were not intrested to me. Once I include all columns, it worked fine.

So PROC DB2UTIL insert does not work like a cobol db2 insert statement where one can insert only few columns.

Thanks once again.

--Raju
Ask a Question
Discussion stats
  • 2 replies
  • 163 views
  • 0 likes
  • 2 in conversation