Example: Using Memset to Reset the Data Structure to Null
This example resets the data structure to NULL when initializing the data structure:
bOpenTable = B5100001_F5108SetUp( lpBhvrCom, lpVoid,
lphUser, &hRequestF5108);
if ( bOpenTable )
{
memset( (void *)(&dsF5108Key), 0x00, sizeof(KEY1_F5108) );
jdeStrcpy( (JCHAR*) dsF5108Key.mdmcu,
(const JCHAR*) lpDS->szBusinessUnit );
memset( (void *)(&dsF5108), 0x00, sizeof(F5108) );
jdeStrcpy( (JCHAR*) dsF5108.mdmcu,
(const JCHAR*) lpDS->szBusinessUnit );
MathCopy(&dsF5108.mdbsct, &mnCentury);
MathCopy(&dsF5108.mdbsfy, &mnYear);
MathCopy(&dsF5108.mdbtct, &mnCentury);
MathCopy(&dsF5108.mdbtfy, &mnYear);
eJDEDBResult = JDB_InsertTable( hRequestF5108,
ID_F5108,
(ID)(0),
(void *) (&dsF5108) );
}