------------------------SDT2$% Central----------------------------------------------------ObjectName----------------------------------------ObjectType----------------------------------------!%&()LinkEndpoints--------------------------------1-------------------------------------------------  Central--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------5--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------()[8(! PROCESS Central)]}-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'(! 6~! d!S)[8(! w)]][9(! 6d! !S)[8(!{ DCL thePINCode Charstring, theCardID long_int, Master Charstring, SQL_stmt arr_256_char, SQL_stmt_ptr ptr_ch"()[(! l! 22!(d)[(! l)[(! 6)[(! 6d! )]][ (! 6)][2(! 62! d!S)[8(! )][(!  !"  )[6(! 6! d!S)[8(!D retcode := SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv))][ ((!~x!"x~)[%(! 6x!! !S)[8(! Connect to database (ENV))]]][(! , !"  ,)[ (! 6! d!S)[8(!? (retcode = SQL_SUCCESS) OR (retcode = SQL_SUCCESS_WITH_INFO))][(!&&X!"&&X)[8(! 6&! false)][4(! 6X! d(!4!5!7)[!(! 1!!3)[!(! 2!!3)]]}3)]]}-----------------------------------------------------------------------------------------------------------------------|!%()HeadingText-----------------------------------!%()PageOrder------------------------------------1initionPage------------------------------------2-------------------------------------------------  !%&()LinkEndpoints----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------ ------------ ------------()[w(!GSDL)]}-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------()[(! f! 22!(d)[h(! f)[k(! 6)[n(! 6d! )]][ t(! 6r)][9w(! 62! !S)[8(! SYNTYPE CardBaseIndexType = Natural CONSTANTS 1 : CardMax ENDSYNTYPE CardBaseIndexType; /* The structure containing a card and its code. */ NEWTYPE CardRecordType STRUCT CardData Charstring; CodeData KeyArrayType; ENDNEWTYPE CardRecordType; /* The card and code array containing the cards and codes. */ NEWTYPE CardArrayType Array( CardBaseIndexType, CardRecordType); ENDNEWTYPE CardArrayType; /* The database containing the cards and codes. */ NEWTYPE CardBaseType STRUCT CardArray CardArrayType; NoOfElements CardBaseIndexType := 0; ENDNEWTYPE CardBaseType; DCL CardBase CardBaseType, CurrentCardNbr long_int := 0, ErrorMsg Charstring; )]][9(! 6! !S)[8(!_ DCL henv SQLHENV, hdbc SQLHDBC, hstmt SQLHSTMT, retcode SQLRETURN, sp SQLPOINTER; )]][a(! 6! !S)[8(! 6*! macros)]][(! 6! !S)[8(! 6! ODBC)]][3!S)[8(! )]]][(! !" )[8(! 6! true )][6(! 6 ! xd!S)[8(!X retcode := SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, #code('(void*)SQL_OV_ODBC3'), 0))][(!!")[ (! 6R! d!S)[8(!? (retcode = SQL_SUCCESS) OR (retcode = SQL_SUCCESS_WITH_INFO))][(!RL&L&!"&&RL)[8(! 6 e! false)][4 (! 6! d!S)[8(! )]]][(!LLF!"FL)[8(! 6e! true)][6 (! 6RF! d!S)[8(!9 retcode := SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc))][ C(!x@x!"@xx)[@(! 6@F!! !S)[8(! (DBC))]]][(!"rr:!":)[ (! 6 :! d!S)[8(!? (retcode = SQL_SUCCESS) OR (retcode = SQL_SUCCESS_WITH_INFO))][(! ll!"4 l)[8(! 6! false)][4(! 6^! d!S)[8(! )]]]["(! !" )[8(! 6! true)][6(! 6, ! !S)[8(! retcode := SQLSetConnectAttr(hdbc, SQL_LOGIN_TIMEOUT, #code('(void*)5'), 0), retcode := SQLConnect(hdbc, #code('(SQLCHAR*)"AccessControl"'), SQL_NTS, #code('(SQLCHAR*)""'), SQL_NTS, #code('(SQLCHAR*)""'), SQL_NTS))][.(!Z  !" Z )[ +(! 6 ! ,d!S)[8(!? (retcode = SQL_SUCCESS) OR (retcode = SQL_SUCCESS_WITH_INFO))][:(!"  !" " )[8(! 6; ! true)][67(! 6 ! d!S)[8(!; retcode := SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt))][ I(!  !"  )[=(! 6 !! !S)[8(! Initialize (STMT))]]][O(!  !"  )[ L(! 6 ! ,d!S)[8(!? (retcode = SQL_SUCCESS) OR (retcode = SQL_SUCCESS_WITH_INFO))][(!N &N & !"&H & N )[8(! 6 g ! false)][4R(! 6 ! d!S)[8(! )]]][X(!N N  !" N )[8(! 6F5 ! true)][(! 6 !Z)][3(! 6 ! d!S)[8(! w)]]]]]]][4(! !"  )[8(! 6 ! false)][41(! 6d ! d!S)[8(! )]]]]]]]]]]]]]]]]]]]]]]}^(! 62^! !S)[8(!< DCL temp1 ptr_void, temp2 ptr_void, temp SQLINTEGER;)]]]]}rror, Msg, s}& &)[4R(! 6 ! d!S)[8(! )]]]]]]][X(!N N  !" N )[8(! 6F5 ! true)][(! 6 !te arr_6_unsigned_char, Msg arr_256_unsigned_char, NativeError SQLINTEGER, MsgLen SQLSMALLINT, temp ptr_SQLCHAR, temp2 ptr_SQLCHAR;)]][$d(! 6L! !S)[(! 6s! EXPORTED MainCardExists)]]]] ar;)]][9(! 6! !S)[8(! DCL CodeNbrInd SQLINTEGER, CardNbrInd SQLINTEGER, MasterInd SQLINTEGER, PINCode SQLINTEGER, CardId SQLINTEGER, CardIndex SQLINTEGER;)]][$z(! 6F! #,!S)[(! 6Y! EXPORTED Register)]][$}(! 6! ,!S)[(! 6@! EXPORTED Check)]][9(! 6dr! !S)[8(! DCL SQL_sta!Z)][3(! 6 ! d!S)[8(! w)]]]]]]][4(! !"  )[8(! 6 ! false)][41(! 6d ! d!%S)[8(! )]]]]]]]]]]]]]]]]]]]][9^(! 62^! !S)[8(!N DCL temp1 ptr_void, temp2 ptr_void, temp SQLINTEGER, tmp Charstring;)]]]]}rstring;)]]]]}--------------------------------------------