× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I get what you're saying about the row count. I actually do that with GET DIAGNOSTICS after fetching the first cursor defined. Your method of checking SQLER3 is more efficient.

Before I bore you with all the code... My question is whether the Fetch into the DS "initializes" the DS? Or does it just overlay the DS with the rows retrieved?

Clearing the DS seems to work for now. What I saw in debug was just odd.

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Buck Calabro
Sent: Wednesday, August 30, 2023 4:39 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: SQL Fetch into DS

Not exactly, but it won't hurt.

I understand that you tried it and got no results; perhaps posting that
code will clear this up. Lord knows I myself have put a CLEAR one line
too far down...

What I myself do for multi-row FETCHes is to handle undesired SQLSTATEs,
and then only use as many rows as got actually returned by checking SQLER3.

https://www.ibm.com/docs/en/i/7.4?topic=area-field-descriptions


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.