BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.
deleted_user
Not applicable
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Update

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1253 views
  • 0 likes
  • 2 in conversation