×
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.
"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 10/14/2017 07:07:50
AM:
In fact I have the handler about done. I'm a little confused on one
final piece of dissecting the fetched row out to return back to the
database manager.
If anyone could help me with that part I'd be very grateful. That
part is in the beginning part if this thread.
I gave you those answers. What is it you're confused about? Show
some of your code when you ask your follow up question.
What I said was that once you set the address, the fetched data
will be in your data field (host variable) automatically. Thus, I don't
see why it would be confusing to get the data from there. As an example,
the following shows setting the address in my equivalent of the SQLVAR.
if SqlUtl_IsSQLType(pTblDesc.Var(dsx).Type: 'CHAR');
pTblDesc.Var(dsx).Data = %addr(pTblData.Dsc_F);
else;
pTblDesc.Var(dsx).Data = %addr(pTblData.Dsc);
endif;
pTblDesc.Var(dsx).Ind = %addr(pIndArry(DSC));
The above looks at the data type for the column (having
predetermined that it is a character coilumn) to determine if it is a
fixed-length character column or a variable-length character column.
pTblData.Dsc_F is my host variable for a fixed-length character value and
pTblData.Dsc is my host variable for a variable-length character value.
The line after the "endif" is setting the address for the indicator host
variable.
As I said from the beginning... After the FETCH ... USING
DESCRIPTOR, those host variables will contain the fetched data.
Sincerely,
Dave Clark
As an Amazon Associate we earn from qualifying purchases.