RE: Getting XML from IDS9.30
Posted in 2004
Malc P wrote
> My problem:-
> I have a maintenance program written in Informix 4gl
> that needs to send the data changes (extracted from the
> database) to another system.
> As an intermediate step an XML file needs to be produced
> allowing another process to format and transfer the data to
> the remote system.
>
> Having had a look at the WebExplode UDR to generate the XML
> doesn't seem to fit well with what we want to do. So what
> are my options?
>
Use sqlcmd
# test.sql
Select * from systables where tabid > 99 ;
sqlcmd -d database -F XML test.sql
Output --
<RECORD>
<tabname>scheme</tabname>
<owner>informix</owner>
<partnum>5242896</partnum>
<tabid>142</tabid>
<rowsize>138</rowsize>
<ncols>23</ncols>
<nindexes>5</nindexes>
<nrows>39483</nrows>
<created>26/11/2001</created>
<version>11077321</version>
<tabtype>T</tabtype>
<locklevel>R</locklevel>
<npused>2821</npused>
<fextsize>1922</fextsize>
<nextsize>192</nextsize>
<flags>8</flags>
<site></site>
<dbname></dbname>
<type_xid>0</type_xid>
<am_id>0</am_id>
</RECORD>
<RECORD>
<tabname>entry</tabname>
<owner>informix</owner>
<partnum>5242897</partnum>
<tabid>143</tabid>
<rowsize>65</rowsize>
<ncols>9</ncols>
<nindexes>2</nindexes>
<nrows>585538</nrows>
<created>26/11/2001</created>
<version>10355644</version>
<tabtype>T</tabtype>
<locklevel>R</locklevel>
<npused>20191</npused>
<fextsize>3444</fextsize>
<nextsize>344</nextsize>
<flags>8</flags>
<site></site>
<dbname></dbname>
<type_xid>0</type_xid>
<am_id>0</am_id>
</RECORD>
________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email
Security System.
________________________________________________________________________
sending to informix-list