As this is the specific reason that cursors are supported in HLL languages, I hardly see a design issue with using a cursor to generate a report.
I think Charles would be hard pressed to find a reasonable alternative to cursors, if given that the result set is of varying row counts (as is often the case with report printing). Perhaps that statement was made in a thread with specific requirements (and when taken in context, could be supported), but as a general purpose constraint, I think its a bit too much...
jmo,
Eric
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of
MKirkpatrick@xxxxxxxxxxxxxxxxx
Sent: Monday, November 05, 2007 11:47 AM
To: Midrange Systems Technical Discussion
Subject: RE: Simple report pgm using embedded SQL
I think I remember someone on this list suggesting that if you are using a
cursor, you are probably doing it wrong. So, I was wondering how one
might avoid using cursors in this simple example. Thanks.
Michael Kirkpatrick
Western Dental Services, Inc.
Information Systems / System i Development
(
Phone:
(714) 571.3582
(
Toll free:
(800) 471.4444
7
Fax:
(714) 480.3001
*
Email:
mkirkpatrick@xxxxxxxxxxxxxxxxx
8
Web:
http://www.westerndental.com/
"Elvis Budimlic" <ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
11/05/2007 09:44 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
To
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
cc
Subject
RE: Simple report pgm using embedded SQL
Why not use QM query? It accepts variables and has output option of
*PRINT.
Elvis
2007 System i Fall Technical Conference | Orlando | November 4-7
Celebrating 10-Years of SQL Performance Excellence on IBM i5/OS and OS/400
-----Original Message-----
Subject: Re: Simple report pgm using embedded SQL
My apologies, perhaps I should have been more specific. I want to PRINT a
report just listing data in a file. Thanks.
Michael Kirkpatrick
As an Amazon Associate we earn from qualifying purchases.