×
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.
On 07/04/2010, at 11:36 PM, David FOXWELL wrote:
In this example, gDS is not being filled by wDS. Is it because wDS
is qualified?
D wDS DS LIKEDS ( gDS )
gDS = wDS;
I thought it would be the same as a MOVE operation from one
character field to another.
What's the correct way to achieve this? Must I qualify gDS? I wanted
to avoid that for a particular reason.
LIKEDS creates a qualified data structure as a matter of course so I
don't see how you can avoid that. Ordinarily a qualified data
structure might suggest that EVAL-CORR is required to move data from
one DS to the other but since LIKEDS was provided at VRM510 and EVAL-
CORR didn't arrive until VRM540 it stands to reason that there must be
another way of copying on DS to another. Also, I might WANT to do a
blanket copy of data without respect to like-named sub-fields so there
must be an alternative to EVAL-CORR even on VRM540 and later.
Since gDS = wDS; is a simple assignment the data in wDS will be copied
to the area allocated to gDS. This is equivalent to a MOVE and has
worked since inception so if it doesn't seem to work for you then
either the compiler is broken or your code is not doing what you think
it's doing.
Hmm, Barbara broke something or David broke something? I know where my
bet is being placed.
Does wDS actually have data at this point? Is there a local gDS that
obscures the (presumably) global gDS that you want to change? What
else is your program doing with these two fields?
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists
http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.