QERROR - MSG for 1b - TIME check on 17x ?? - are we getting ALL the data ???? **loose data on startup - 2k ! split into 4 files - if open after X secs - doit Fip messages - ditto redo exchgs to use pTmpo ?? bate codes - left as sigle chrs for now - but also code for multi.... All lines ended with NL All Exchs mapped to 2-4 chr Code Delay field is in always so marked as the 3rd field - in mins Each field separated by a PIPE - looks like the only chr NOT used... (Exch Code) | (STOX Code) | (delay) | (bate) (data) [opt... | (bate) (data) ] (NL) Still to do - actual data conversions.... - Use their bate codes ?? Notes stripped the market code for NYSE/AMEX/NASDAQ ;List of Exchange Codes ; * means ALL Market Centres exchange:0Ba CANa exchange:0Bf FOREX exchange:0Bm CANm exchange:0Bt CANt exchange:0D* NYSE exchange:0E* AMEX exchange:0F* NASDAQ ; ComStock Service Messages ;exchange:1B MSG exchange:13* CBOT exchange:16a SWX exchange:16h HK exchange:16t OSLO exchange:16u STKHM exchange:17d AMS exchange:17g MIL exchange:17k FRK exchange:17l LSEl exchange:17n LSEn exchange:17q MATIF exchange:17r PAR exchange:17s LSEs exchange:17u LSEu ; Timechecks exchange:1F TIME ; a - Ask bate:a ; b - Bid bate:b ; c - Correction bate:c ; f - flags bate:f ; g - Alert bate:g ; i - Incremental Volume bate:i ; m - currency bate:m ; v - Cumulative Volume bate:v ; w - Previous Day's Volume bate:w ----------- watch delay actual conversions dbl bate numbers have a comma after need to have ALL a bate/data before processing.. ipcmstk This program connects to the Comstock server, Logons on, tells the server which Exchangesand Fields are to be accessed and what needs to be stuffed on the WatchList. Occasional dump of all or certain fields of particular exchanges (called Snapshotting Financial Instruments). Incoming files are dumped into spool/2brouted for 'iproute' to decide where to send and process. Generally Magazine text file are sent to the editorial box while financial data is reprocessed and stuffed in a database. For a list of magazines available plus details of fields, exchanges etc, please refer to the Comstock documentation. That is a polite way of saying you need the book! It uses a parameter file, tables/setup/COMSTOCK, to describe what to setup : Syntax are : ; comment line exchange: bate: field-separator: default: pipe '|' snap:(name) time:(time) contract:(contract) dest:(dest) [allfields:] manual:(name) contract:(contract) fields: (optional) is a series of field names. Normally the defaults are reasonable which are : fields:CV,ED,II,MA,MD,ST,YC,CL name is used for manuals only; for snaps it is for your use. time is 4 digit, 24 hour format (ie no dots, colons etc). Not used for Manuals. contract is any valid contract. Generally this is a all stox for an exchange ("S*EX" is S for LSE, *EX meaning all stox) If more than one contract is required, use a comma to separate contract:S*EX,U*EX allfields: (optional) is to extract ALL data for each stox requested. You are NOT advised to do that too often. manual:lse contract:S*EX manual:liffe contract:L*EX ; big one of ALL data at 6am snap:lse.check time:0600 contract:S*EX allfields: snap:lse.noon time:1200 contract:S*EX Input Parameters (all optional) : -s : Comstock Server hostname default: "cmstk" -p : Comstock Server port number default: 1000 -P : Sparc port number default: 9222 -q : Snapshot NOW queue default: spool/cmstksnap -o : Output queue default: spool/2brouted -v : Print the version number and exit ----------Notes----------- --The parameter file is read once on startup. --Only if we are connected, logged on and have finished setup, will we snapshot !! --If the Comstock server logs us off - like at 2am every morning - we wait and try to reconnect automatically. --Magazines data files are sent to a DU (destination) of ComstockmagABC where ABC is the first 3 letters of the magazine. --To trigger manuals, a file with a FILENAME containing a header field of CM:(name) is stuffed in the cmstksnap queue where name is the same as the manual name. Eg: touch /fip/spool/cmstksnap/#SN:okboys#CM:lse will trigger a manual of "lse" if one exists in the parameter file. --Normal Startup sequence is as follows : 1. Connect to Comstock server 2. Logon 3. wait for Comstock system quality messages 4. Load which fields we want for our snap shots 5. Load the magazine numbers we want to sample The FIP log will show: Thu May 9 02:07:10 ipcmstk !s : Logon ok - Starting Setup Thu May 9 02:07:10 ipcmstk !z : Comstock System Message Thu May 9 02:07:10 ipcmstk !z : Comstock System Message C3 Thu May 9 02:07:10 ipcmstk !z : Status Feed Status : 0 : Ok Thu May 9 02:07:11 ipcmstk !z : Status Database Quality : 0 : all Ok Thu May 9 02:07:13 iproute !i : Comstock Comstock7679 CTL : Comstocksysmsg SYS.INFO Thu May 9 02:07:13 iproute !i : Comstock COMSTOCK7680 CTL : COMSTOCKsysmsg SYS.INFO Thu May 9 02:07:13 iproute !i : COMSTOCK COMSTOCK7681 CTL : COMSTOCKsysmsg STATUS Thu May 9 02:07:23 ipcmstk !z : Load Fields for Shares Thu May 9 02:07:23 ipcmstk !z : Command Succeeded Thu May 9 02:07:26 ipcmstk !z : Load Magazines requested Thu May 9 02:07:26 ipcmstk !z : Command Succeeded Thu May 9 02:07:28 ipcmstk !z : Setup Completed successfully --Installation On the Sparc, we need queues spool/cmstksnap for manual snaps plus tables/setup/Comstock for parameter file plus tables/route/Comstock for routings plus correct destinations in tables/sys/USERS For Magazines, check tables/xchg/Comstock2XXX For FinInst, check 'ipxcmstk' is also running / in SYSTEM On the Comstock server, change the hostname, IP address, Port number for the Server plus an entry for each Sparc - IP address and Port number. (copyright) 2016 and previous years FingerPost Ltd.