× 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.




Chris,

I see that Dave Clark noticed the problem where your basing pointer was
pointing to the wrong data structure. (facepalm) I should have noticed that
before.

Here's a way to get the SQL statement without using the based VARCHAR
field. (untested ...)

/copy qsysinc/qrpglesrc,ezdaep
dcl-ds ezdaep_full_t;
header likeds(EZDSQLF2);
data char(10000); // not sure how big this should be
end-ds;

dcl-pi ODBCEXIT;
allow char(1);
datain likeds(exdaep_full_t);
end-pi;

dcl-s Upper varchar(128);

Upper = %subst(exdaep_full.data : 1 : extaep_full.header.EZDQLSTL);

-- Barbara

------------------------------

Original message
date: Thu, 16 Jan 2020 12:06:38 -0500
from: Chris Holko <christopherholko@xxxxxxxxx>
subject: Re: How do I clip a vary length field?

EZDQLSTL appears as junk, using the code sample I posted earlier; it is the
simplest way to demo my issue; data_in looks right but I am of the opinion
I am making a pointer to the wrong variable.I cannot determine how to put a
pointer to what is received on entry to the program as I would have
suspected a qualified name for the data structure but that isn?t right.

I am not looking for a gimmick solution and sorry if I implied that
earlier. I am trying to receive in the data from the exit point regardless
of size and I need to deal with it in more than one size as the program
processes the data. Hence the need to move a portion to a much smaller
variable. I used 128 because I can easily submit statements larger than
that.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.