I'm trying to use a nested data structure to create a compile-time key/value-pair store. It works if I explicitly set the type for each of the initial values, but I'd like to use a LIKE() instead. Is there a way to do that directly? Plan B would be to create a template data structure to reference.
Here's the code snippet with compiler errors inserted.
Dcl-ds A qualified ;
*n like(A.xyz.key) inz(1) ;
RNF7030: The name or indicator A.XYZ.KEY is not defined.
RNF0623: The simple qualified name is not specified correctly.
*n varChar(128) inz('AA') ;
*n int(10) inz(2) ;
*n varChar(128) inz('BB') ;
*n int(10) inz(3) ;
*n varChar(128) inz('CC') ;
Dcl-ds xyz dim(3) pos(1) ;
key int(10) ;
value varChar(128) ;
This mailing list archive is Copyright 1997-2019 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