OSI/MHS Management Programming Manual
Examples
OSI/MHS Management Programming Manual—424824-001
C-56
Example in C
 where (appl_name = :mspwtabl_row.appl_name);
 sql_error = sqlcode;
 if (!sql_error)
 {
 exec sql commit work;
 }
 else
 {
 exec sql rollback work;
 }
 return (sql_error);
} /* end alter_mspwtabl_row */
/***************************************************************************/
/* Function: delete_mspwtabl_row */
/* Usage : error = delete_mspwtabl_row (appl_name) */
/* Parameters: appl_name INPUT */
/*-------------------------------------------------------------------------*/
/* Delete a MSPWTABL row in response to an DELETE APPL request. If a */
/* SQL error is encountered, return the error code, otherwise return */
/* zero. */
/***************************************************************************/
int delete_mspwtabl_row (zmhs_ddl_appl_name_def *appl_name)
{
 int sql_error;
 memcpy (mspwtabl_row.appl_name, appl_name, sizeof 
(zmhs_ddl_appl_name_def));
 exec sql begin work;
 exec sql
 delete from =mspwtabl
 where appl_name = :mspwtabl_row.appl_name;
 sql_error = sqlcode;
 if (!sql_error)
 {
 exec sql commit work;
 }
 else
 {
 exec sql rollback work;
 }
 return (sql_error);
} /* end delete_mspwtabl_row */
/***************************************************************************/
/* Function: send_password_response */
/* Usage : send_password_response (rsp_flag, */
/* rsp_passw) */
/* Parameters: rsp_flag INPUT */
/* rsp_passw INPUT */
/*-------------------------------------------------------------------------*/
/* Build the response in the spi_rsp buffer and invoke send_reply to */
/* send it. Depending on the rsp_flag (PASSW_ERROR_RSP or PASSW_OK_RSP), */
/* send either an error response or an OK response. If the rsp_passw */
/* pointer is not NULL, include the response password in the response. */
/***************************************************************************/
void send_password_response (int rsp_flag,
 zmhs_ddl_passw_def *rsp_passw)










