Skip to main content
Version: Upcoming

SRParentCancel

V8 Message Definiton

Records inserted into this table causes the corresponding parent order to be cancelled if it is active and cancellable.\nEither put in a custom datasource or deprecate from SRSE (Natively not allowed to be modified via SRSE)

METADATA

AttributeValue
Topic3985-parent-orders
MLink TokenClientTrading
ProductSRTrade
accessTypeSELECT,INSERT,DELETE

Table Definition

FieldTypeKeyDefault ValueComment
accntVARCHAR(16)PRI''
parentNumberCHAR(19)PRI'0000-0000-0000-0000'
clientFirmVARCHAR(16)PRI''SR client firm
sysEnvironmentenum - SysEnvironment'None'original source sys environment Stable Current etc
runStatusenum - RunStatus'None'original source run status ProdBeta
cxlReasonVARCHAR(16)''
altCancelIdVARCHAR(24)''
engineNameVARCHAR(32)''set by the engine handling event should be blank on arrival
modifiedByVARCHAR(24)''user who last modified this record
modifiedInenum - SysEnvironment'None'
timestampDATETIME(6)'1900-01-01 00:00:00.000000'timestamp of last modification

PRIMARY KEY DEFINITION (Unique)

FieldSequence
accnt1
parentNumber2
clientFirm3

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRTrade`.`MsgSRParentCancel` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`parentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`sysEnvironment` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None' COMMENT 'original (source) sys environment [Stable, Current, etc]',
`runStatus` ENUM('None','Prod','Beta','UAT','SysTest') NOT NULL DEFAULT 'None' COMMENT 'original (source) run status [Prod,Beta]',
`cxlReason` VARCHAR(16) NOT NULL DEFAULT '',
`altCancelId` VARCHAR(24) NOT NULL DEFAULT '',
`engineName` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'set by the engine handling event (should be blank on arrival)',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
CONSTRAINT nonnegative_parentNumber CHECK(ASCII(parentNumber) < 56),
PRIMARY KEY USING HASH (`accnt`,`parentNumber`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Records inserted into this table causes the corresponding parent order to be cancelled if it is active and cancellable.\nEither put in a custom datasource or deprecate from SRSE (Natively not allowed to be modified via SRSE)';

SELECT TABLE EXAMPLE QUERY

SELECT
`accnt`,
`parentNumber`,
`clientFirm`,
`sysEnvironment`,
`runStatus`,
`cxlReason`,
`altCancelId`,
`engineName`,
`timestamp`
FROM `SRTrade`.`MsgSRParentCancel`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a CHAR(19) */
`parentNumber` = 'Example_parentNumber'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRTrade`.`MsgSRParentCancel`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a CHAR(19) */
`parentNumber`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') */
`sysEnvironment`,
/* Replace with a ENUM('None','Prod','Beta','UAT','SysTest') */
`runStatus`,
/* Replace with a VARCHAR(16) */
`cxlReason`,
/* Replace with a VARCHAR(24) */
`altCancelId`,
/* Replace with a VARCHAR(32) */
`engineName`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_accnt',
'Example_parentNumber',
'Example_clientFirm',
'None',
'None',
'Example_cxlReason',
'Example_altCancelId',
'Example_engineName',
'2022-01-01 12:34:56.000000'
);

DELETE TABLE EXAMPLE QUERY

DELETE FROM `SRTrade`.`MsgSRParentCancel` 
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a CHAR(19) */
`parentNumber` = 'Example_parentNumber'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SRParentCancel' ORDER BY ordinal_position ASC;