You cannot specify multiple levels in the like, according to the help on the error you received. Notice "it cannot contain more than one period"
Cause . . . . . : A simple qualified name is formed by specifying the owning data structure name followed by a period (.) followed by the subfield name. It cannot contain more than one period, and it cannot start or end with a period. The subfield-name part must be one of the subfields in the data structure.

I don't think of using templates is a plan B. They are very nice. However, if you want to avoid them and if you are willing to name at least one of your subfields, you could use this syntax.

Dcl-ds A qualified ;
key int(10) inz(1) ;
value varChar(128) inz('AA') ;
*n like(a.key) inz(2) ;
*n like(a.value) inz('BB') ;
*n like(a.key) inz(3) ;
*n like(a.value) inz('CC') ;
Dcl-ds xyz dim(3) pos(1) ;
key like(A.Key);
value like(a.value);
End-ds ;

-----Original Message-----
Templates were my Plan B. I was just checking if there's a way to avoid them.

This thread ...


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

This mailing list archive is Copyright 1997-2020 by 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].