Re: help with tables



On Feb 1, 1:43 pm, Frederico Fonseca <real-email-in-msg-
s...@xxxxxxxxx> wrote:
On Thu, 31 Jan 2008 18:17:42 -0600, Robert <n...@xxxxxx> wrote:
On Thu, 31 Jan 2008 11:56:10 -0700, "Frank Swarbrick" <Frank.Swarbr...@xxxxxxxxxxxxxx>
wrote:

SQL0060W The "COBOL" precompiler is in progress.
19 SQL0008N The token "occurs" found in a host variable
declaration is not valid.
51 SQL0306N The host variable "TABLE2-ENTRY" is undefined.
SQL0095N No bind file was created because of previous
errors.
SQL0091W Precompilation or binding was ended with "3"
errors and "0" warnings.

I also tried this and got the same error
05 table2-entry occurs 100.

Now of course you can remove the occurs, but then you're stuck with fetching
one row at a time.

I see no way to do a multi row (at once) fetch using DB2/LUW.

More thoughts would be welcome.

I believe this will work for sure:

05 table2-entry.
10 t2-name pic x(30) occurs 100.
10 t2-dept pic x(04) occurs 100.

fetch t2_curs
into :t2-name, :t2-dept

Frank

Actually it was Robert that you were replying to.

STOP stating what you think should work,

The Mine of Misinformation strikes again.

Whenever Robert says 'this will work' or similar you can be sure that
it is answering the wrong question, and/or that it will not work, and/
or he hasn't tested it at all.


and download a copy of DB2
UDB (9.5) for Windows freely available from IBM.

Then using your COBOL Compiler of choice for Windows
(Fujitsu/Microfocus/RMCOBOL (you will need to pay me for the interface
though), or other, and create a fully working program that will fetch
100 rows in one single SQL FETCH statement, using only ESQL. Note that
the above is possible using CLI programming, but this is not what was
asked.

Then show us the code.

Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com

.