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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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