Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODO Table formatting in a mainframe dump

Status
Not open for further replies.

3gm

Programmer
Mar 7, 2001
437
US
I ran into an interesting situation that I wanted to share with you. I had a program on an IBM mainframe. I was getting a user abend due to a table overflow. I got a LE formatted dump and went to see what the last few entries in my table were.

To make a long story shorter, the table was not expanded so I couldn't see any entries. The table was defined with OCCURS 0 to 200 TIMES DEPENDING ON (ODO) and the dependent variable was +201. That was expected because I used the following code:
Code:
ADD +1   TO WS-TABLE-CNT           
IF WS-TABLE-CNT > WS-TABLE-MAX
    PERFORM 2190-USER-ABEND
END-IF
[\CODE]
Pretty standard stuff.  I change the code to:
[code]
IF WS-TABLE-CNT < WS-TABLE-MAX
    ADD +1   TO WS-TABLE-CNT
ELSE
    PERFORM 2190-USER-ABEND
END-IF
[\CODE]
and the table formatted correctly in the dump.  Obviously, LE is smart enough to know the object of the ODO is out of range so it doesn't attempt to expand the table AT ALL!

Guess I'll change my coding style so that I don't let ODO objects go out of range even if I'm going to abend the program.

Regards,

Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top