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



Sounds like you may have some other syntax error, either in the unqualified DS definition or before that within the source.

You could try putting both data structures in a new source member by themselves and then compile that program to see if you get a syntax error.
That way you can rule out an issue with those definitions.

Do you want to share the actual definition?

Having one data structure as un-qualified has never been an issue as long as the fields you want to map have the same name in both data structures.

This code generates a single "Both are the same" Eval-Corr summary. Which is what we would expect from what you are saying your code does.

Dcl-ds xxx;
var1 char(1);
var2 char(2);
End-ds;
Dcl-ds yyy likeds(xxx) Dim(10);
eval-corr xxx = yyy(1);
eval-corr yyy(1) = xxx;

E V A L - C O R R S u m m a r y
EVAL-CORR summary 1 008000 008100
Both data structures defined with same LIKEDS or LIKEREC


When adding additional fields more summaries are generated.

Dcl-ds xxx;
var1 char(1);
var2 char(2);
var4 char(2);
End-ds;

Dcl-ds yyy qualified dim(10);
var1 char(1);
var2 char(2);
var3 char(2);
End-ds;

eval-corr xxx = yyy(1);
eval-corr yyy(1) = xxx;

E V A L - C O R R S u m m a r y
EVAL-CORR summary 1 008700
VAR1 Assigned; exact match
VAR2 Assigned; exact match
*RNF7341 VAR4 In target only.
*RNF7342 VAR3 In source only.
EVAL-CORR summary 2 008800
VAR1 Assigned; exact match
VAR2 Assigned; exact match
*RNF7341 VAR3 In target only.
*RNF7342 VAR4 In source only.


Make sure you are looking at the correct summary line when reviewing the compile listing.
The "RNF7341/RNF7342" lines should always follow the summary line.


Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.


-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Alan Cassidy
Sent: Tuesday, July 20, 2021 2:10 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Encore: Host variable not defined or not a valid structure.. (was Re: Eval-Corr puzzle)

By the way we are on 7.3.
RPG reference says one of the two data structures can be unqualified if the
other is qualified.
Eval-Corr KCS = KQCS(bx).
KCS is not qualified, but DS array KQCS is defined as LIKEDS(KCS).
I moved two of the fields individually and got no error for that:
KCSfield1 = KQCS.field2 ;
KCSfield2 = KQCS.field2 ;

Any ideas?

--alan

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.