- ingres_errno = SMS_INGRES_ERR;
- com_err(whoami, SMS_INGRES_ERR, " code %d\n", ingres_errno);
- return *num;
+ char buf[256];
+
+ switch (*num) {
+ case INGRES_BAD_INT:
+ ingres_errno = SMS_INTEGER;
+ break;
+ case INGRES_BAD_DATE:
+ ingres_errno = SMS_DATE;
+ break;
+ default:
+ ingres_errno = SMS_INGRES_ERR;
+ com_err(whoami, SMS_INGRES_ERR, " code %d\n", *num);
+ sprintf(buf, "Ingres error %d", *num);
+ send_zgram("ingres_error", buf);
+ return (*num);
+ }
+ return (0);