/*******************************************************************************
**
** Source File Name = utilapi.h
**
** Licensed Materials - Property of IBM
**
** (C) COPYRIGHT International Business Machines Corp. 1995, 1999
** All Rights Reserved.
**
** US Government Users Restricted Rights - Use, duplication or
** disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
**
**
*******************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#ifndef max
#define  max(A, B) ((A) > (B) ? (A) : (B))
#endif
#ifndef min
#define  min(A, B) ((A) > (B) ? (B) : (A))
#endif

/* Macro for API SQL Checking */
int rc;
#define API_SQL_CHECK( MSG_STR )                               \
    rc = SqlInfoPrint( MSG_STR, &sqlca, __LINE__, __FILE__) ;  \
    if ( rc != 0 )                                             \
    {   return 1;                                              \
    }		                                              
	

/* functions used in ...SQL_CHECK macros */
int  SqlInfoPrint( char *, struct sqlca *, int, char *);
    
#ifdef __cplusplus
}
#endif