Re: FIXML DTD to Cobol record
Mahesh Kumaraguru <>
28 Jun 2007 11:41PM ETNiroj,
This is a simple sample Document Type Definition (MyFIX.dtd):
This is a simple sample XML which shall use the above DTD
Mahesh
Niroj
55=ABC^...
10=098
Now you want a Cobol copybook (MYFIX.COBOL) like
1. FIX_MESSAGE.
10. FIX_HEADER.
20. FIX_VERSION PIC X(10).
88 VERSION_FIX40 VALUE 'FIX.4.0'
88 VERSION_TIF VALUE 'FIXT.5.0'
20. BODY_LENGTH PIC N(6).
20. FIX_MESG_TYPE PIC XXX.
88 MESG_TYPE_LOGON VALUE 'A'.
10. FIX_MESG_BODY.
20 TICKER_SYMBOL PIC X(20).
10 FIX_MESG_TRAILER.
20 FIX_CHECKSUM PIX NNN.
which you want to use like COPY MYFIX. What language are you planning to use to develop this converter? I know how to do it using Java-XML tools. You would also need a bidirectional FIX-TCP to COBOL adapter which would convert FIXML message to COBOL record and call a Cobol program passing the Cobol record which it constructed using the values in the FIXML and convert from Cobol program output to FIXML record and "run" the FIX session - ie. send it to counterparty.
Regarding "2. Convert FIXML DTD to standard xml message structure.", I did not get it, I would use a DTD to validate a message, I would have a Java program convert my Cobol data into a FIXML / XML message and check it using the DTD before sending it on the wire.
Correct me if my assumptions about your EAI project are incorrect.
Regards,
K. Mahesh
Note :- The source code provided may not compile and even if it compiles is supplied without warranty of fitness for intended purpose(s). The user assumes all resposnibility for any damages to data, person, property and money due to reading, copying, compiling, using/misusing/not using, quoting or talking about the above mentioned software suite code named MYFIX.
For,
the author.
> Hi,
>
> Can you please tell me or guide me how to:
>
> 1. Convert FIXML DTD (vesrion 4.4) to cobol message structures for all
> message types i.e. to generate equivalent cobol data structure from
> FIXML DTD autometically.
>
>
> 2. Convert FIXML DTD to standard xml message structure.
>
> Thanks and warm regards, Niroj Pradhan