I'll try the possibility to use the Nested ds but they dont work like I wonder, here's an example:
The first declaration (NBA2) works, while the second no, Because NBA.Nested for all element is '1LAKERS'.
Why?
Many thanks.
Code:
**free Ctl-Opt DftActGrp(*no) ActGrp('QILE') BndDir('QC2LE' ) Option(*NoUnRef :*SrcStmt :*NoDebugIo) DatFmt(*iso) TimFmt(*iso) DecEdit('0.') Debug AlwNull(*UsrCtl); // Not Nested Dcl-Ds NBA2 Qualified; *n char(11) inz('1LAKERS '); *n Char(11) inz('2BULLS '); *n Char(11) inz('3CAVALIERS '); *n Char(11) inz('4WARRIOS '); a LikeDs(A_Template) dim(4) Pos(1) ; End-Ds; Dcl-Ds a_template Qualified; Code Char(1) ; Team Char(10) ; End-Ds ; // Nested DS Dcl-Ds NBA Qualified; *n char(11) inz('1LAKERS '); *n Char(11) inz('2BULLS '); *n Char(11) inz('3CAVALIERS '); *n Char(11) inz('4WARRIOS '); Dcl-Ds Nested dim(4) Pos(1); Code Char(1) ; Team Char(10) ; End-Ds Nested; End-Ds; Dsply ('Michael Jordan played into: ' + NBA2.A(%Lookup('2' :Nba2.A(*).Code)).Team); Dsply ('Michael Jordan played into: ' + NBA.Nested(%Lookup('2' :Nba.Nested(*).Code)).Team); Return ;
Why?
Many thanks.
Comment