BYTE column in INFORMIX-ESQL/COBOL
Posted in 2007
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I need to insert and retrieve a BYTE column in an old program written with INFORMIX-ESQL/COBOL.
On Oct 11, 2:57 pm, Pier Natale Dell'Amore
<nataled_dontsp...@libero.it> wrote:
> I need to insert and retrieve a BYTE column in an old program written with
> INFORMIX-ESQL/COBOL.
>
> From "The Informix Guide to SQL - Reference":
> You can insert data into BYTE columns
> - With the dbload or onload utilities
> - With the LOAD statement (DB-Access)
> - From BYTE host variables (INFORMIX-ESQL/C)
> - By declaring a FILE (INFORMIX-ESQL/COBOL)
>
> but I dont know how a FILE variable is declared.
>
> Can someone please point me to a location where I can find an
> INFORMIX-ESQL/COBOL Programmer's Manual?
>
> Thank you in advance
>
> Nat
Look in the include file for the BLOB locator structure, locator.h, in
$INFORMIXDIR/incl/esql. All the information you need is in there and
there are example code in $INFORMIXDIR/demp/esqlc. Look at
blobload.ec, dispcat_pic.ec for examples of reading and writing BLOBS
using a file as the BLOB data input and output source (LOCFNAME). You
can also look at the source for my dbcopy.ec utility in the IIUG
Software Repository package utils2_ak for an example of using reading
to and writing BLOBS from data in memory (LOCMEMORY) and my ul.ec
utility in that same package for an example of using user provided
open/read/write/close functions (LOCUSER). The LOCUSER method tends
to be fastest in my testing with LOCFILE & LOCFNAME a close second.
Art S. Kagel
On Thu, 2007-10-11 at 18:57 +0000, Pier Natale Dell'Amore wrote:
> I need to insert and retrieve a BYTE column in an old program written with
> INFORMIX-ESQL/COBOL.
>
> >From "The Informix Guide to SQL - Reference":
> You can insert data into BYTE columns
> - With the dbload or onload utilities
> - With the LOAD statement (DB-Access)
> - From BYTE host variables (INFORMIX-ESQL/C)
> - By declaring a FILE (INFORMIX-ESQL/COBOL)
>
> but I dont know how a FILE variable is declared.
>
> Can someone please point me to a location where I can find an
> INFORMIX-ESQL/COBOL Programmer's Manual?
http://publib.boulder.ibm.com/epubs/pdf/7893a.pdf , as seen on
http://www.ibm.com/software/data/informix/pubs/library/esql_7.html .
Page 2-26 explains how to declare FILE variables.
HTH,
--
Carsten Haese
http://informixdb.sourceforge.net
On Thu, 2007-10-11 at 19:19 +0000, Art S. Kagel wrote: > Look in the include file for the BLOB locator structure, locator.h, in > $INFORMIXDIR/incl/esql. All the information you need is in there and > there are example code in $INFORMIXDIR/demp/esqlc.[...] I don't think that will help the OP. He was asking about ESQL/COBOL, which is quite different from ESQL/C. -- Carsten Haese http://informixdb.sourceforge.net
On Oct 11, 7:20 pm, Carsten Haese <cars...@uniqsys.com> wrote: > On Thu, 2007-10-11 at 19:19 +0000, Art S. Kagel wrote: > > Look in the include file for the BLOB locator structure, locator.h, in > > $INFORMIXDIR/incl/esql. All the information you need is in there and > > there are example code in $INFORMIXDIR/demp/esqlc.[...] > > I don't think that will help the OP. He was asking about ESQL/COBOL, > which is quite different from ESQL/C. > > -- > Carsten Haesehttp://informixdb.sourceforge.net Missed that. It looked like he wanted either ESQL/C or ESQL/COBOL. Art S. Kagel