The OCCURS cannot be directly reflected, no subscripting in the Sort products. You have a little extra manual or programmatic effort to give each occurence a unique name.
For the data definition try:
The * will use the next available start position (37 for FIELD-2) and the = will "copy" the information at that position from the previous field, so all the lengths and types will be the same, without explicit coding.
Everything can be checked in the SYMNOUT where it will have been expanded to the actual position, lenght and type.
Joined: 06 Jul 2010 Posts: 662 Location: Whitby, ON, Canada
I have noticed small glitches in COBDFSYM too. IBM provides it 'as is', and you are free to change it if you wish.
For instance, I fixed an issue affecting variable sized groups. (Unfortunately I don't remember what the problem was). I also added a couple of input parameters, one to indicate the starting offset (handy for VB files) and other to control whether to use hyphen (-) or underscore (_) in the symbol names.
I also added a feature to generate a MAPDEF structure (it is something that can be used by REXX IMS to parse IMS segments).
Anyway, my point is that if COBDFSYM doesn't work the way you want it to, then change it. It's Rexx, not rocket science.