I have been reading about LIKEDS
, TEMPLATE
, and BASED
trying to determine if there is a way to create data structure templates (prototypes) with inheritance. I have:
D costs DS QUALIFIED TEMPLATE
D material 6 0
D cutting 6 0
D ...etc...
D boxCosts DS LIKEDS(costs)
D folding 6 0
D ...etc...
D posterCosts DS LIKEDS(costs)
D laminating 6 0
D ...etc...
Where I want boxCosts to look like:
boxCosts:
material
cutting
folding
etc. (no laminating, this isn't a poster)
Is there any way to achieve this type of data structure template? I know I could do:
D boxCosts DS
D common LIKEDS(costs)
D folding 6 0
D ...etc...
But this creates a hierarchy when I want a flat structure.
I could maybe do this with a copybook, but I don't know if it would be worse to have a copy book for just the data structure parts I want in its own file, or to have potentially complicated conditional copy book for the whole application that has a small area for copying this information...? Templates come so close to what I want I suspect I must just be missing something.
If you are wondering, the compile error I get from trying to create an inherited data structure like I have shown is RNF3703: The subfield or parameter definition is not specified within a group.
on the first D spec below the LIKEDS
keyword.
Thanks for reading.