Delimiter //
/**
 * Check that the name is not null
 *
 * @param int batchnum
 * @return void
 * @author Ben
 */
Drop Procedure if exists LOADER_GUARANTEED_NORMALIZE_NAME_NOT_NULL //
Create Procedure LOADER_GUARANTEED_NORMALIZE_NAME_NOT_NULL (
    In batchnum int
)
Begin
    Set @flagCountField='LOADER_GUARANTEED_ERRCOUNT';
    Set @flagMsgField='LOADER_GUARANTEED_ERRMSGS';
    Set @lastStatusField=null;
    Set @lastStatus=null;
    Set @checkedFieldName = 'GUARANTEED_NAME';

    CALL LOADER_CHECK_NULL (
        'LOADER_GUARANTEED'
        , @checkedFieldName
        , 'LOADER_GUARANTEED_BATCH_NUM'
        , batchnum
        , @flagCountField
        , @flagMsgField
        , @lastStatusField
        , @lastStatus
    );
End //
Delimiter ;