Truusvlugindewind
Programmer
Mainframe cobol & re-entrantcy... always a pain in the <beep>
Batch/CICS/IMS, bmp or mpp, never a dull moment.
Nowadays I'm coding cobol-db2 stored-procedures, a new nail in our re-entrancy coffin. No cics, no batch, no ims but WLM's. Not only working storage fields containing old values, but 'declared global termory tables' still hanging around from the previous call. Like I said: "never a dull moment".
To code as generic as possible I'd recommend:
1) Always "drop" your temp table before declaring. do not care to test your SQLCODE after dropping, the value is not significant at all.
2) Start using local-storage instead of working-storage. It frees you from a lot of uncertain behaviour.
I'd like your comments on this.
Batch/CICS/IMS, bmp or mpp, never a dull moment.
Nowadays I'm coding cobol-db2 stored-procedures, a new nail in our re-entrancy coffin. No cics, no batch, no ims but WLM's. Not only working storage fields containing old values, but 'declared global termory tables' still hanging around from the previous call. Like I said: "never a dull moment".
To code as generic as possible I'd recommend:
1) Always "drop" your temp table before declaring. do not care to test your SQLCODE after dropping, the value is not significant at all.
2) Start using local-storage instead of working-storage. It frees you from a lot of uncertain behaviour.
I'd like your comments on this.