• 1 reply
  • Latest Post - ‏2011-07-01T20:43:58Z by graham40
127 Posts

Pinned topic BMS occurs question

‏2011-03-15T20:20:03Z |
BMS provides GRPNAME for sub dividing a field - that's nice.

But what about re-occurring on screen lines? I want to list 13 records on screen then update any of the fields thereon e.g.

... ....... ..... ...
.. 11 more exactly the same lines ..
... ....... ..... ...

i.e a total of 13 lines, 52 fields. To define this in BMS requires 52 DFHMDF's. Via 'cicsmap' I then get 52 separate COBOL fields in the copybook. My update program thus requires 52 separate edits. This is not good.

My thoughts say the generated copybook clearly should be:

05 filler occurs 13 times.
10 f1 pic x(3) and the other f1 flds
10 f2 pic x(5) and the other f2 flds
10 f3 pic x(6) and the other f3 flds
10 f4 pic x(3) and the other f4 flds

hence consequent programming would be as simple as:

perform varying cnt from 1 by 1 until cnt > 13
if f1l (cnt) not = zero perform etc
if f2l (cnt) not = zero perform etc
if f3l (cnt) not = zero perform etc
if f4l (cnt) not = zero perform etc

This suggests that BMS needs an OCCURS feature. My question is:

  • has such a feature become available and I've missed it
  • might it be available one day (I could ask IBM for it?)
  • just wishful thinking
  • is there a 'common' method of handling what is essentially a list

Graham Hobbs
Updated on 2011-07-01T20:43:58Z at 2011-07-01T20:43:58Z by graham40
  • graham40
    127 Posts

    Re: BMS occurs question

    Me again,
    I phrased this one badly. Has also been worked over before - think a Mr. Haig wrote something about it moons ago.
    Will revisit this in weeks to come.