INSERT INTO MWCONFIG.CODEX (ID, XML, MODIFIED_BY, TIMESTAMP)
	VALUES ('dsp', '<codex escape="true" raw="true">
	<!-- SOCKET HEADER -->
	<field id="dspPacketLength" type="groupLengthBinary" decimal-format="binary" length="4" />
	<field id="dspHeaderType" type="string" charset="cp1047" length="5" />
	<field id="dspDeviceName" type="string" charset="cp1047" length="15" />
	<field id="dspSocketNumber" type="numericBinary" decimal-format="packed" length="5" />
	<field id="dspPortNumber" type="numericBinary" decimal-format="packed" length="3" />
	<field id="dspFiller1" type="binary" length="1" />

	<!-- MIDDLEWARE HEADER -->
	<field id="dspHeaderLength" type="numeric" charset="cp1047" length="4" />
	<field id="dspMessageLength" type="numeric" charset="cp1047" length="6" />
	<field id="dspVersionNumber" type="string" charset="cp1047" length="4" />
	<field id="dspHeaderFormatId" type="string" charset="cp1047" length="4" />
	<field id="dspDataFormatId" type="string" charset="cp1047" length="10" />
	<field id="dspSourceId" type="string" charset="cp1047" length="10" />
	<field id="dspDestinationId" type="string" charset="cp1047" length="10" />
	<field id="dspRoutingNumber" type="string" charset="cp1047" length="6" />
	<field id="dspMessageStatus" type="string" charset="cp1047" length="8" />
	<field id="dspBankIdNumber" type="string" charset="cp1047" length="11" />
	<field id="dspNode" type="string" charset="cp1047" length="2" />
	<field id="dspExchangeId" type="binary" length="20" />
	<field id="dspScenarioNumber" type="string" charset="cp1047" length="16" />
	<field id="dspTransactionCode" type="string" charset="cp1047" length="4" />
	<field id="dspRetrievalReferenceNumber" type="string" charset="cp1047" length="22" />
	<field id="dspAcquirerReferenceNumber" type="string" charset="cp1047" length="12" />
	<field id="dspTransmissionNumber" type="numeric" charset="cp1047" length="4" />
	<field id="dspNumberOfRecordsToBeLoaded" type="numeric" charset="cp1047" length="4" />
	<field id="dspNumberOfErrorsToBeLoaded" type="numeric" charset="cp1047" length="4" />
	<field id="dspUserId" type="string" charset="cp1047" length="10" />
	<field id="dspTerminalId" type="string" charset="cp1047" length="10" />
	<field id="dspSupervisorId" type="string" charset="cp1047" length="10" />
	<field id="dspMoreRecordIndicator" type="string" charset="cp1047" length="1" />
	<field id="dspCutOffIndicator" type="string" charset="cp1047" length="1" />
	<field id="dspUserData" type="string" charset="cp1047" length="20" />

	<field id="!type" type="script">dsp</field>
	<field id="!code" type="script" encode="true">${msg.dspScenarioNumber}.${msg.dspTransactionCode?.padLeft(10, "0")}</field>
	<field id="!parseCodex" type="script">${msg["!group"]}.${msg.dspTransactionCode?.padLeft(10, "0")}</field>
	<field id="!subCodex" type="script">${getParamValue("dsp-scenario-req-codex", msg.dspScenarioNumber, "")}</field>
</codex>
', CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.CODEX (ID, XML, MODIFIED_BY, TIMESTAMP)
	VALUES ('dsp-abcs-request', '<codex escape="true" raw="true">
	<!-- ABCS HEADER OFFSET=246 -->
	<field id="ICLEN" type="numericBinary" length="4" padding-mode="left" padding-char="0" />
	<field id="ICHEAD" type="string" charset="cp1047" length="5" />
	<field id="ICRTRQ" type="string" charset="cp1047" length="10" />
	<field id="ICDEVN" type="string" charset="cp1047" length="15" />
	<field id="ICID" type="string" charset="cp1047" length="5" />
	<field id="ICCOMQ" type="string" charset="cp1047" length="10" />
	<field id="ICIPSF" type="numericBinary" decimal-format="packed" length="5" />
	<field id="TMTIMIN" type="string" charset="cp1047" length="6" padding-mode="left" padding-char="0" />
	<field id="TMTXTYP" type="string" charset="cp1047" length="5" />
	<field id="ICRSV1" type="numericBinary" decimal-format="packed" length="5" />
	<field id="ICEOM" type="string" charset="cp1047" length="4" />
	<!-- ABCS MSG -->
	<field id="TLBCUD" type="string" charset="cp1047" length="3" />
	<field id="TLBWS" type="string" charset="cp1047" length="2" />
	<field id="TLBSOV" type="string" charset="cp1047" length="8" />
	<field id="TLBFP3" type="binary" length="1" />
	<field id="FILLER1" type="string" charset="cp1047" length="3" />
	<field id="TLBID" type="numericBinary" decimal-format="packed" length="4" />
	<field id="TLBTCD" type="string" charset="cp1047" length="4" />
	<field id="TLBTDT" type="string" charset="cp1047" length="6" />
	<field id="TLBPST" type="binary" length="2" />
	<field id="TLBWC1" type="binary" length="1" />
	<field id="TLBWC2" type="binary" length="1" />
	<field id="TLBJSN" type="numericBinary" decimal-format="binary" length="4" />
	<field id="TLBJC1" type="binary" length="1" />
	<field id="TLBJC2" type="binary" length="1" />
	<field id="TLBFP1" type="binary" length="1" />
	<field id="TLBFP2" type="binary" length="1" />
	<field id="TLBF01" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF02" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF03" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF04" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF05" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF06" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF07" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF08" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF09" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF10" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF11" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF12" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF13" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF14" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF15" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF16" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF17" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF18" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF19" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBF20" type="numericBinary" decimal-format="packed" length="10" />
	<field id="TLBAFL" type="binary" length="2" />
	<field id="TLBCUR" type="string" charset="cp1047" length="4" />
	<field id="TLBCIF" type="string" charset="cp1047" length="7" />
	<field id="TLBPRD" type="string" charset="cp1047" length="2" />
	<field id="TLBSRC" type="string" charset="cp1047" length="1" />
	<field id="TLBTPN" type="string" charset="cp1047" length="40" />
	<field id="TLBPNM" type="string" charset="cp1047" length="20" />
	<field id="TLBREN" type="string" charset="cp1047" length="1" />
	<field id="TLBIDC" type="string" charset="cp1047" length="1" />
	<field id="TLBXAT" type="string" charset="cp1047" length="1" />
	<field id="TLCUR1" type="string" charset="cp1047" length="4" />
	<field id="TLCUR2" type="string" charset="cp1047" length="4" />
	<field id="TLCUR3" type="string" charset="cp1047" length="4" />
	<field id="TLBC01" type="string" charset="cp1047" length="1" />
	<field id="TLBC02" type="string" charset="cp1047" length="1" />
	<field id="TLBC03" type="string" charset="cp1047" length="1" />
	<field id="TLBC04" type="string" charset="cp1047" length="1" />
	<field id="TLBC05" type="string" charset="cp1047" length="1" />
	<field id="TLBC06" type="string" charset="cp1047" length="1" />
	<field id="TLBC07" type="string" charset="cp1047" length="1" />
	<field id="TLBC08" type="string" charset="cp1047" length="1" />
	<field id="TLBC09" type="string" charset="cp1047" length="1" />
	<field id="TLBC10" type="string" charset="cp1047" length="1" />
	<field id="TLBC11" type="string" charset="cp1047" length="1" />
	<field id="TLBC12" type="string" charset="cp1047" length="1" />
	<field id="TLBC13" type="string" charset="cp1047" length="1" />
	<field id="TLBC14" type="string" charset="cp1047" length="1" />
	<field id="TLBC15" type="string" charset="cp1047" length="1" />
	<field id="TLBC16" type="string" charset="cp1047" length="1" />
	<field id="TLBC17" type="string" charset="cp1047" length="1" />
	<field id="TLBC18" type="string" charset="cp1047" length="1" />
	<field id="TLBC19" type="string" charset="cp1047" length="1" />
	<field id="TLBC20" type="string" charset="cp1047" length="1" />
	<field id="TLXUFD" type="string" charset="cp1047" length="10" />
	<field id="TLBDS1" type="string" charset="cp1047" length="50" />
	<field id="TLBDS2" type="string" charset="cp1047" length="40" />
	<field id="RMCKC" type="string" charset="cp1047" length="15" />
	<field id="RMUSRI" type="string" charset="cp1047" length="20" />
	<field id="RMSRC" type="numericBinary" decimal-format="packed" length="2" />
	<field id="RMAPID" type="string" charset="cp1047" length="25" />
	<field id="RMNAME" type="string" charset="cp1047" length="40" />
	<field id="RMADD1" type="string" charset="cp1047" length="40" />
	<field id="RMADD2" type="string" charset="cp1047" length="40" />
	<field id="RMADD3" type="string" charset="cp1047" length="30" />
	<field id="RMPSTC" type="string" charset="cp1047" length="10" />
	<field id="RMCNT" type="string" charset="cp1047" length="20" />
	<field id="RMPYNM" type="string" charset="cp1047" length="40" />
	<field id="RMPYID" type="string" charset="cp1047" length="25" />
	<field id="RMPAD1" type="string" charset="cp1047" length="40" />
	<field id="RMPAD2" type="string" charset="cp1047" length="40" />
	<field id="RMPAD3" type="string" charset="cp1047" length="30" />
	<field id="RMPPSC" type="string" charset="cp1047" length="10" />
	<field id="RMPYCN" type="string" charset="cp1047" length="20" />
	<field id="RMSEHS" type="string" charset="cp1047" length="4" />
	<field id="RMSECT" type="string" charset="cp1047" length="3" />
	<field id="TLBFIL" type="string" charset="cp1047" length="40" />
	<field id="FILLER" type="binary" length="2"/>

	<field id="!type" type="script" encode="true">dsp-abcs-request</field>
	<field id="!code" type="script" encode="true">${dtree("BDS-CODE", "dspScenarioNumber")}</field>
	<field id="!parseCodex" type="script">${msg["!group"]}.${msg.dspTransactionCode?.padLeft(10, "0")}</field>
</codex>
', CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.CODEX (ID, XML, MODIFIED_BY, TIMESTAMP)
	VALUES ('dsp-response', '<codex>
	<!-- SOCKET HEADER -->
	<field id="dspPacketLength" type="groupLengthBinary" decimal-format="binary" length="4" />
	<field id="dspHeaderType" type="string" charset="cp1047" length="5" />
	<field id="dspDeviceName" type="string" charset="cp1047" length="15" />
	<field id="dspSocketNumber" type="numericBinary" decimal-format="packed" length="5" />
	<field id="dspPortNumber" type="numericBinary" decimal-format="packed" length="3" />
	<field id="dspFiller1" type="binary" length="1" />

	<!-- MIDDLEWARE HEADER -->
	<field id="dspHeaderLength" type="numeric" charset="cp1047" length="4" />
	<field id="dspMessageLength" type="numeric" charset="cp1047" length="6" />
	<field id="dspVersionNumber" type="string" charset="cp1047" length="4" />
	<field id="dspHeaderFormatId" type="string" charset="cp1047" length="4" />
	<field id="dspDataFormatId" type="string" charset="cp1047" length="10" />
	<field id="dspSourceId" type="string" charset="cp1047" length="10" />
	<field id="dspDestinationId" type="string" charset="cp1047" length="10" />
	<field id="dspRoutingNumber" type="string" charset="cp1047" length="6" />
	<field id="dspMessageStatus" type="string" charset="cp1047" length="8" />
	<field id="dspBankIdNumber" type="string" charset="cp1047" length="11" />
	<field id="dspNode" type="string" charset="cp1047" length="2" />
	<field id="dspExchangeId" type="binary" length="20" />
	<field id="dspScenarioNumber" type="string" charset="cp1047" length="16" />
	<field id="dspTransactionCode" type="string" charset="cp1047" length="4" />
	<field id="dspRetrievalReferenceNumber" type="string" charset="cp1047" length="22" />
	<field id="dspAcquirerReferenceNumber" type="string" charset="cp1047" length="12" />
	<field id="dspTransmissionNumber" type="numeric" charset="cp1047" length="4" />
	<field id="dspNumberOfRecordsToBeLoaded" type="numeric" charset="cp1047" length="4" />
	<field id="dspNumberOfErrorsToBeLoaded" type="numeric" charset="cp1047" length="4" />
	<field id="dspUserId" type="string" charset="cp1047" length="10" />
	<field id="dspTerminalId" type="string" charset="cp1047" length="10" />
	<field id="dspSupervisorId" type="string" charset="cp1047" length="10" />
	<field id="dspMoreRecordIndicator" type="string" charset="cp1047" length="1" />
	<field id="dspCutOffIndicator" type="string" charset="cp1047" length="1" />
	<field id="dspUserData" type="string" charset="cp1047" length="20" />

	<field id="!code" type="script">${msg.dspScenarioNumber+"."+msg.dspTransactionCode?.padLeft(10, "0")}</field>
	<field id="!subCodex" type="script">${getParamValue("dsp-scenario-resp-codex", msg.dspScenarioNumber, "")}</field>
</codex>', CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.CODEX (ID, XML, MODIFIED_BY, TIMESTAMP)
	VALUES ('dsp-abcs-subresponse', '<codex>
	<field id="responseLength" type="groupLengthBinary" decimal-format="packed" length="2" base="2" />
	<field id="responseCode" type="string" charset="cp1047" length="2" />
	<field id="responseHeader" type="binary" length="1" />

	<field id="!type" type="script">${msg.get("responseCode")}</field>
	<field id="!subCodex" type="script">dsp-abcs-subresponse-${msg.get("responseCode")}</field>
</codex>
', CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.CODEX (ID, XML, MODIFIED_BY, TIMESTAMP)
	VALUES ('dsp-abcs-subresponse-89', '<codex>
	<field id="responseLength" type="groupLengthBinary" decimal-format="packed" length="2" base="2" />
	<field id="responseCode" type="string" charset="cp1047" length="2" />
	<field id="responseHeader" type="binary"  length="1" />
	<field id="responseSubHeader" type="binary"  length="1" />
	
	<field id="ACCTNO" type="numericBinary" decimal-format="packed" length="10" />
	<field id="ACTYPE"  type="string" charset="cp1047" length="1" />
	<field id="SNAME"  type="string" charset="cp1047" length="20" />
	<field id="CFSSNO"  type="string" charset="cp1047" length="25" />
	<field id="STATUS" type="numericBinary" decimal-format="packed" length="1" />
	<field id="CBAL" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="COLECT" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="TTFLAV" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="TTFLDL" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="DDIBTL" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="HCFLOT" type="numericBinary" decimal-format="P(2)" length="7" />
	<field id="LC1" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="LC2" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="LC3" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="LC4" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="LC5" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="LCOV5" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="IBFLOT" type="numericBinary" decimal-format="P(2)" length="7" />
	<field id="MCFLOT" type="numericBinary" decimal-format="P(2)" length="7" />
	<field id="TTOC" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="TTODOC" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="TTMC" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="HOLD" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="WHYTD" type="numericBinary" decimal-format="P(2)" length="7" />
	<field id="WHTDY" type="numericBinary" decimal-format="P(2)" length="7" />
	<field id="ACCRU2" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="ODINT2" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="NETAMT" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="ODCBAL" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="ODLIMT" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="ODDLIM" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="ODACC2" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="ODUNA2" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="PBBAL" type="numericBinary" decimal-format="P(2)" length="10" />
	<field id="TLNBSR" type="numericBinary" decimal-format="packed" length="4" />
	<field id="UNPAMT" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="UNPITM" type="numericBinary" decimal-format="packed" length="3" />
	<field id="TTLLC" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="TLRINQ" type="string" charset="cp1047" length="1" />
	<field id="TTOCP" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="DDSIC1" type="binary" length="1" />
	<field id="DDSIC2" type="binary" length="1" />
	<field id="DDSIC3" type="binary" length="1" />
	<field id="DDSIC4" type="binary" length="1" />
	<field id="TTSA" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="IB1" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="IB2" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="IB3" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="IB4" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="IB5" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="AVLBAL" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="MINBLM" type="numericBinary" decimal-format="P(2)" length="8" />
</codex>
', CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.CODEX (ID, XML, MODIFIED_BY, TIMESTAMP)
	VALUES ('dsp-abcs-subresponse-F1', '<codex>
	<field id="responseLength" type="groupLengthBinary" decimal-format="packed" length="2" base="2" />
	<field id="responseCode" type="string" charset="cp1047" length="2" />
	<field id="responseHeader" type="binary" length="1" />
	<field id="TLXMNE" type="string" charset="cp1047" length="3" />
	<field id="SNAME" type="string" charset="cp1047" length="20" />
	<field id="ACC" type="numericBinary" decimal-format="packed" length="10" />
	<field id="AMT1" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="AMT2" type="numericBinary" decimal-format="P(2)" length="8" />
	<field id="!type" type="script">${msg.get("responseCode")}</field>
</codex>
', CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.DTREE (GROUP, PATH, VALUE, MODULE, MODIFIED_BY, TIMESTAMP)
	VALUES ('BDS-CODE', 'AXISSYSTEMSDNBHD', 'AXISSYSTEMSDNBHD.${msg.dspTransactionCode?.padLeft(10, "0")}', NULL, CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.DTREE (GROUP, PATH, VALUE, MODULE, MODIFIED_BY, TIMESTAMP)
	VALUES ('DSPRESP-CODE', 'AXISSYSTEMSDNBHD', 'AXISSYSTEMSDNBHD.${msg.dspTransactionCode?.padLeft(10, "0")}', NULL, CURRENT USER, CURRENT TIMESTAMP);

INSERT INTO MWCONFIG.PARAM_MAP(GROUP, NAME, VALUE, TIMESTAMP, MODIFIED_BY)
	VALUES ('dsp-scenario-req-codex', 'AXISSYSTEMSDNBHD', '||dsp-abcs-request', CURRENT TIMESTAMP, CURRENT USER),
		   ('dsp-scenario-req-codex', 'SSSAAA0123456789','||dsp-mbase-req', CURRENT TIMESTAMP, CURRENT USER);

INSERT INTO MWCONFIG.PARAM_MAP(GROUP, NAME, VALUE, TIMESTAMP, MODIFIED_BY)
	VALUES ('dsp-scenario-resp-codex', 'AXISSYSTEMSDNBHD','||dsp-abcs-response', CURRENT TIMESTAMP, CURRENT USER);
INSERT INTO MWCONFIG.PARAM_MAP(GROUP, NAME, VALUE, TIMESTAMP, MODIFIED_BY)
	VALUES ('dsp-scenario-resp-codex', 'SSSAAA0123456789','||dsp-mbase-resp', CURRENT TIMESTAMP, CURRENT USER);
