Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Pier Natale Dell'Amore asked how to insert and retrieve a BYTE column in an old INFORMIX-ESQL/COBOL program. Art S. Kagel pointed to the locator structure in locator.h and ESQL/C demo and utility sources. Carsten Haese noted that was ESQL/C, not COBOL, and cited the ESQL/COBOL manual's FILE variable section. Art admitted missing that. No COBOL solution was given.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
I need to insert and retrieve a BYTE column in an old program written with
INFORMIX-ESQL/COBOL.
↪ replying to Pier Natale Dell'Amore
Art S. Kagel — — source: Usenet: comp.databases.informix
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
↪ replying to Carsten Haese
Art S. Kagel — — source: Usenet: comp.databases.informix
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
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.